blob: 6e1825f68932f5b0c51cb60c3f927101b9e6e5c1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200649ac_ct_READELF
650READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200652ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200671NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673MAINCC
674CXX
675OBJEXT
676EXEEXT
677ac_ct_CC
678CPPFLAGS
679LDFLAGS
680CFLAGS
681CC
682EXPORT_MACOSX_DEPLOYMENT_TARGET
683CONFIGURE_MACOSX_DEPLOYMENT_TARGET
684SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200685_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200704PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100705host_os
706host_vendor
707host_cpu
708host
709build_os
710build_vendor
711build_cpu
712build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500713HAS_HG
714HGBRANCH
715HGTAG
716HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400717BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000718target_alias
719host_alias
720build_alias
721LIBS
722ECHO_T
723ECHO_N
724ECHO_C
725DEFS
726mandir
727localedir
728libdir
729psdir
730pdfdir
731dvidir
732htmldir
733infodir
734docdir
735oldincludedir
736includedir
737localstatedir
738sharedstatedir
739sysconfdir
740datadir
741datarootdir
742libexecdir
743sbindir
744bindir
745program_transform_name
746prefix
747exec_prefix
748PACKAGE_URL
749PACKAGE_BUGREPORT
750PACKAGE_STRING
751PACKAGE_VERSION
752PACKAGE_TARNAME
753PACKAGE_NAME
754PATH_SEPARATOR
755SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000756ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000757ac_user_opts='
758enable_option_checking
759enable_universalsdk
760with_universal_archs
761with_framework_name
762enable_framework
763with_gcc
764with_cxx_main
765with_suffix
766enable_shared
767enable_profiling
768with_pydebug
769with_libs
770with_system_expat
771with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100772with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000773enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000774with_dbmliborder
775with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000776with_threads
777with_thread
778enable_ipv6
779with_doc_strings
780with_tsc
781with_pymalloc
782with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000783with_fpectl
784with_libm
785with_libc
786enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000787with_computed_gotos
788'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000789 ac_precious_vars='build_alias
790host_alias
791target_alias
792CC
793CFLAGS
794LDFLAGS
795LIBS
796CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200797CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000801ac_init_help=
802ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000803ac_unrecognized_opts=
804ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805# The variables have the same names as the options, with
806# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000807cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810no_recursion=
811prefix=NONE
812program_prefix=NONE
813program_suffix=NONE
814program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819x_includes=NONE
820x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000821
822# Installation directory options.
823# These are left unexpanded so users can "make install exec_prefix=/foo"
824# and all the variables that are supposed to be based on exec_prefix
825# by default will actually change.
826# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828bindir='${exec_prefix}/bin'
829sbindir='${exec_prefix}/sbin'
830libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831datarootdir='${prefix}/share'
832datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833sysconfdir='${prefix}/etc'
834sharedstatedir='${prefix}/com'
835localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836includedir='${prefix}/include'
837oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
839infodir='${datarootdir}/info'
840htmldir='${docdir}'
841dvidir='${docdir}'
842pdfdir='${docdir}'
843psdir='${docdir}'
844libdir='${exec_prefix}/lib'
845localedir='${datarootdir}/locale'
846mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 # If the previous option needs an argument, assign it.
853 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 ac_prev=
856 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200860 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
861 *=) ac_optarg= ;;
862 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 # Accept the important Cygnus configure options, so we can diagnose typos.
866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 case $ac_dashdash$ac_option in
868 --)
869 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 -bindir | --bindir | --bindi | --bind | --bin | --bi)
872 ac_prev=bindir ;;
873 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875
876 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 -cache-file | --cache-file | --cache-fil | --cache-fi \
882 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
883 ac_prev=cache_file ;;
884 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
885 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 cache_file=$ac_optarg ;;
887
888 --config-cache | -C)
889 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
897 | --dataroo | --dataro | --datar)
898 ac_prev=datarootdir ;;
899 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
900 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
901 datarootdir=$ac_optarg ;;
902
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200907 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 ac_useropt_orig=$ac_useropt
909 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
910 case $ac_user_opts in
911 *"
912"enable_$ac_useropt"
913"*) ;;
914 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
915 ac_unrecognized_sep=', ';;
916 esac
917 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918
919 -docdir | --docdir | --docdi | --doc | --do)
920 ac_prev=docdir ;;
921 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
922 docdir=$ac_optarg ;;
923
924 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
925 ac_prev=dvidir ;;
926 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
927 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000930 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000932 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200933 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000934 ac_useropt_orig=$ac_useropt
935 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
936 case $ac_user_opts in
937 *"
938"enable_$ac_useropt"
939"*) ;;
940 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
941 ac_unrecognized_sep=', ';;
942 esac
943 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
946 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
947 | --exec | --exe | --ex)
948 ac_prev=exec_prefix ;;
949 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
950 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
951 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Obsolete; use --with-gas.
956 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 -help | --help | --hel | --he | -h)
959 ac_init_help=long ;;
960 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
961 ac_init_help=recursive ;;
962 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
963 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
971 ac_prev=htmldir ;;
972 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
973 | --ht=*)
974 htmldir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -includedir | --includedir | --includedi | --included | --include \
977 | --includ | --inclu | --incl | --inc)
978 ac_prev=includedir ;;
979 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
980 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -infodir | --infodir | --infodi | --infod | --info | --inf)
984 ac_prev=infodir ;;
985 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -libdir | --libdir | --libdi | --libd)
989 ac_prev=libdir ;;
990 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
994 | --libexe | --libex | --libe)
995 ac_prev=libexecdir ;;
996 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
997 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -localedir | --localedir | --localedi | --localed | --locale)
1001 ac_prev=localedir ;;
1002 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1003 localedir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007 ac_prev=localstatedir ;;
1008 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1013 ac_prev=mandir ;;
1014 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --without-fp.
1019 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 no_create=yes ;;
1024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1026 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1027 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1030 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1031 | --oldin | --oldi | --old | --ol | --o)
1032 ac_prev=oldincludedir ;;
1033 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1034 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1035 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1039 ac_prev=prefix ;;
1040 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1044 | --program-pre | --program-pr | --program-p)
1045 ac_prev=program_prefix ;;
1046 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1047 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1051 | --program-suf | --program-su | --program-s)
1052 ac_prev=program_suffix ;;
1053 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1054 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -program-transform-name | --program-transform-name \
1058 | --program-transform-nam | --program-transform-na \
1059 | --program-transform-n | --program-transform- \
1060 | --program-transform | --program-transfor \
1061 | --program-transfo | --program-transf \
1062 | --program-trans | --program-tran \
1063 | --progr-tra | --program-tr | --program-t)
1064 ac_prev=program_transform_name ;;
1065 -program-transform-name=* | --program-transform-name=* \
1066 | --program-transform-nam=* | --program-transform-na=* \
1067 | --program-transform-n=* | --program-transform-=* \
1068 | --program-transform=* | --program-transfor=* \
1069 | --program-transfo=* | --program-transf=* \
1070 | --program-trans=* | --program-tran=* \
1071 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1075 ac_prev=pdfdir ;;
1076 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1077 pdfdir=$ac_optarg ;;
1078
1079 -psdir | --psdir | --psdi | --psd | --ps)
1080 ac_prev=psdir ;;
1081 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1082 psdir=$ac_optarg ;;
1083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1085 | -silent | --silent | --silen | --sile | --sil)
1086 silent=yes ;;
1087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1089 ac_prev=sbindir ;;
1090 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1091 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
1094 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1095 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1096 | --sharedst | --shareds | --shared | --share | --shar \
1097 | --sha | --sh)
1098 ac_prev=sharedstatedir ;;
1099 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1100 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1101 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1102 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 -site | --site | --sit)
1106 ac_prev=site ;;
1107 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1111 ac_prev=srcdir ;;
1112 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1116 | --syscon | --sysco | --sysc | --sys | --sy)
1117 ac_prev=sysconfdir ;;
1118 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1119 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
1127 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1128 verbose=yes ;;
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 -version | --version | --versio | --versi | --vers | -V)
1131 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001150 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001152 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001153 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt_orig=$ac_useropt
1155 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1156 case $ac_user_opts in
1157 *"
1158"with_$ac_useropt"
1159"*) ;;
1160 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1161 ac_unrecognized_sep=', ';;
1162 esac
1163 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 --x)
1166 # Obsolete; use --with-x.
1167 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1170 | --x-incl | --x-inc | --x-in | --x-i)
1171 ac_prev=x_includes ;;
1172 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1173 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1177 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1178 ac_prev=x_libraries ;;
1179 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1180 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001183 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1184Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ;;
1186
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 *=*)
1188 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1189 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 case $ac_envvar in #(
1191 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 export $ac_envvar ;;
1196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001202 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 ;;
1204
1205 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206done
1207
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211fi
1212
Matthias Kloseb9621712010-04-24 17:59:49 +00001213if test -n "$ac_unrecognized_opts"; then
1214 case $enable_option_checking in
1215 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1218 esac
1219fi
1220
1221# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1223 datadir sysconfdir sharedstatedir localstatedir includedir \
1224 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1225 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 # Remove trailing slashes.
1229 case $ac_val in
1230 */ )
1231 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1232 eval $ac_var=\$ac_val;;
1233 esac
1234 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 [\\/$]* | ?:[\\/]* ) continue;;
1237 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001240done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242# There might be people who depend on the old broken behavior: `$host'
1243# used to hold the argument of --host etc.
1244# FIXME: To remove some day.
1245build=$build_alias
1246host=$host_alias
1247target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249# FIXME: To remove some day.
1250if test "x$host_alias" != x; then
1251 if test "x$build_alias" = x; then
1252 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001253 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1254 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 elif test "x$build_alias" != "x$host_alias"; then
1256 cross_compiling=yes
1257 fi
1258fi
1259
1260ac_tool_prefix=
1261test -n "$host_alias" && ac_tool_prefix=$host_alias-
1262
1263test "$silent" = yes && exec 6>/dev/null
1264
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266ac_pwd=`pwd` && test -n "$ac_pwd" &&
1267ac_ls_di=`ls -di .` &&
1268ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274# Find the source files, if location was not specified.
1275if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 ac_confdir=`$as_dirname -- "$as_myself" ||
1279$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1280 X"$as_myself" : 'X\(//\)[^/]' \| \
1281 X"$as_myself" : 'X\(//\)$' \| \
1282 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1283$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1285 s//\1/
1286 q
1287 }
1288 /^X\(\/\/\)[^/].*/{
1289 s//\1/
1290 q
1291 }
1292 /^X\(\/\/\)$/{
1293 s//\1/
1294 q
1295 }
1296 /^X\(\/\).*/{
1297 s//\1/
1298 q
1299 }
1300 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303 srcdir=..
1304 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305else
1306 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308if test ! -r "$srcdir/$ac_unique_file"; then
1309 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1313ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001314 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 pwd)`
1316# When building in place, set srcdir=.
1317if test "$ac_abs_confdir" = "$ac_pwd"; then
1318 srcdir=.
1319fi
1320# Remove unnecessary trailing slashes from srcdir.
1321# Double slashes in file names in object file debugging info
1322# mess up M-x gdb in Emacs.
1323case $srcdir in
1324*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1325esac
1326for ac_var in $ac_precious_vars; do
1327 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1328 eval ac_env_${ac_var}_value=\$${ac_var}
1329 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1330 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1331done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332
Martin v. Löwis11437992002-04-12 09:54:03 +00001333#
1334# Report the --help message.
1335#
1336if test "$ac_init_help" = "long"; then
1337 # Omit some internal or obsolete options to make the list less imposing.
1338 # This message is too long to be a string in the A/UX 3.1 sh.
1339 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001340\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342Usage: $0 [OPTION]... [VAR=VALUE]...
1343
1344To assign environment variables (e.g., CC, CFLAGS...), specify them as
1345VAR=VALUE. See below for descriptions of some of the useful variables.
1346
1347Defaults for the options are specified in brackets.
1348
1349Configuration:
1350 -h, --help display this help and exit
1351 --help=short display options specific to this package
1352 --help=recursive display the short help of all the included packages
1353 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001354 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 --cache-file=FILE cache test results in FILE [disabled]
1356 -C, --config-cache alias for \`--cache-file=config.cache'
1357 -n, --no-create do not create output files
1358 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360Installation directories:
1361 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001362 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001364 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366By default, \`make install' will install all the files in
1367\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1368an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1369for instance \`--prefix=\$HOME'.
1370
1371For better control, use the options below.
1372
1373Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001374 --bindir=DIR user executables [EPREFIX/bin]
1375 --sbindir=DIR system admin executables [EPREFIX/sbin]
1376 --libexecdir=DIR program executables [EPREFIX/libexec]
1377 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1378 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1379 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1380 --libdir=DIR object code libraries [EPREFIX/lib]
1381 --includedir=DIR C header files [PREFIX/include]
1382 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1383 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1384 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1385 --infodir=DIR info documentation [DATAROOTDIR/info]
1386 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1387 --mandir=DIR man documentation [DATAROOTDIR/man]
1388 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1389 --htmldir=DIR html documentation [DOCDIR]
1390 --dvidir=DIR dvi documentation [DOCDIR]
1391 --pdfdir=DIR pdf documentation [DOCDIR]
1392 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393_ACEOF
1394
1395 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001396
1397System types:
1398 --build=BUILD configure for building on BUILD [guessed]
1399 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400_ACEOF
1401fi
1402
1403if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001404 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001405 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001406 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 cat <<\_ACEOF
1408
1409Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001410 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001413 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001414 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --enable-framework[=INSTALLDIR]
1416 Build (MacOSX|Darwin) framework
1417 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001418 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001419 --enable-loadable-sqlite-extensions
1420 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --enable-ipv6 Enable ipv6 (with ipv4) support
1422 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001423 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Optional Packages:
1427 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1428 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001429 --with-universal-archs=ARCH
1430 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001431 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001432 --with-framework-name=FRAMEWORK
1433 specify an alternate name of the framework built
1434 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001436 --with-cxx-main=<compiler>
1437 compile main() and link python executable with C++
1438 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with-suffix=.exe set executable suffix
1440 --with-pydebug build with Py_DEBUG defined
1441 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001442 --with-system-expat build pyexpat module using an installed expat
1443 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001444 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001445 --with-system-libmpdec build _decimal module using an installed libmpdec
1446 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001447 --with-dbmliborder=db1:db2:...
1448 order to check db backends for dbm. Valid value is a
1449 colon separated string with the backend names
1450 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with(out)-threads[=DIRECTORY]
1453 disable/enable thread support
1454 --with(out)-thread[=DIRECTORY]
1455 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001457 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001459 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-fpectl enable SIGFPE catching
1461 --with-libm=STRING math library
1462 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001463 --with(out)-computed-gotos
1464 Use computed gotos in evaluation loop (enabled by
1465 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Some influential environment variables:
1468 CC C compiler command
1469 CFLAGS C compiler flags
1470 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1471 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 CPP C preprocessor
1476
1477Use these variables to override the choices made by `configure' or to help
1478it to find libraries and programs with nonstandard names/locations.
1479
Georg Brandle2e15612009-05-20 18:25:10 +00001480Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001483fi
1484
1485if test "$ac_init_help" = "recursive"; then
1486 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 test -d "$ac_dir" ||
1489 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1490 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_builddir=.
1492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493case "$ac_dir" in
1494.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1495*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 case $ac_top_builddir_sub in
1500 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1502 esac ;;
1503esac
1504ac_abs_top_builddir=$ac_pwd
1505ac_abs_builddir=$ac_pwd$ac_dir_suffix
1506# for backward compatibility:
1507ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
1509case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 ac_top_srcdir=$ac_top_builddir_sub
1513 ac_abs_top_srcdir=$ac_pwd ;;
1514 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 ac_top_srcdir=$srcdir
1517 ac_abs_top_srcdir=$srcdir ;;
1518 *) # Relative name.
1519 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1520 ac_top_srcdir=$ac_top_build_prefix$srcdir
1521 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001522esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 cd "$ac_dir" || { ac_status=$?; continue; }
1526 # Check for guested configure.
1527 if test -f "$ac_srcdir/configure.gnu"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1530 elif test -f "$ac_srcdir/configure"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001534 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 fi || ac_status=$?
1536 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 done
1538fi
1539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001541if $ac_init_version; then
1542 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001543python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001544generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001546Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547This configure script is free software; the Free Software Foundation
1548gives unlimited permission to copy, distribute and modify it.
1549_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001552
1553## ------------------------ ##
1554## Autoconf initialization. ##
1555## ------------------------ ##
1556
1557# ac_fn_c_try_compile LINENO
1558# --------------------------
1559# Try to compile conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_c_try_compile ()
1561{
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 rm -f conftest.$ac_objext
1564 if { { ac_try="$ac_compile"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_compile") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1579 test $ac_status = 0; } && {
1580 test -z "$ac_c_werror_flag" ||
1581 test ! -s conftest.err
1582 } && test -s conftest.$ac_objext; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
1587
1588 ac_retval=1
1589fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001590 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 as_fn_set_status $ac_retval
1592
1593} # ac_fn_c_try_compile
1594
Matthias Kloseb9621712010-04-24 17:59:49 +00001595# ac_fn_c_try_link LINENO
1596# -----------------------
1597# Try to link conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_link ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 rm -f conftest.$ac_objext conftest$ac_exeext
1602 if { { ac_try="$ac_link"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_link") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1617 test $ac_status = 0; } && {
1618 test -z "$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 } && test -s conftest$ac_exeext && {
1621 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001622 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 }; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
1631 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1632 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1633 # interfere with the next link command; also delete a directory that is
1634 # left behind by Apple's compiler. We do this before executing the actions.
1635 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001636 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001637 as_fn_set_status $ac_retval
1638
1639} # ac_fn_c_try_link
1640
Matthias Kloseb9621712010-04-24 17:59:49 +00001641# ac_fn_c_try_cpp LINENO
1642# ----------------------
1643# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_cpp ()
1645{
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 if { { ac_try="$ac_cpp conftest.$ac_ext"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001662 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001663 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 }; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_cpp
1677
1678# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1679# -------------------------------------------------------
1680# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1681# the include files in INCLUDES and setting the cache variable VAR
1682# accordingly.
1683ac_fn_c_check_header_mongrel ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001686 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001689if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 $as_echo_n "(cached) " >&6
1691fi
1692eval ac_res=\$$3
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1694$as_echo "$ac_res" >&6; }
1695else
1696 # Is the header compilable?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1698$as_echo_n "checking $2 usability... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701$4
1702#include <$2>
1703_ACEOF
1704if ac_fn_c_try_compile "$LINENO"; then :
1705 ac_header_compiler=yes
1706else
1707 ac_header_compiler=no
1708fi
1709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1711$as_echo "$ac_header_compiler" >&6; }
1712
1713# Is the header present?
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1715$as_echo_n "checking $2 presence... " >&6; }
1716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717/* end confdefs.h. */
1718#include <$2>
1719_ACEOF
1720if ac_fn_c_try_cpp "$LINENO"; then :
1721 ac_header_preproc=yes
1722else
1723 ac_header_preproc=no
1724fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001725rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1727$as_echo "$ac_header_preproc" >&6; }
1728
1729# So? What about this header?
1730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1731 yes:no: )
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1733$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1735$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1736 ;;
1737 no:yes:* )
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1739$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1741$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1743$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1745$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1747$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001748( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001749## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001750## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 ) | sed "s/^/$as_me: WARNING: /" >&2
1752 ;;
1753esac
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1755$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001756if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 $as_echo_n "(cached) " >&6
1758else
1759 eval "$3=\$ac_header_compiler"
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766
1767} # ac_fn_c_check_header_mongrel
1768
1769# ac_fn_c_try_run LINENO
1770# ----------------------
1771# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1772# that executables *can* be run.
1773ac_fn_c_try_run ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776 if { { ac_try="$ac_link"
1777case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_link") 2>&5
1784 ac_status=$?
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1787 { { case "(($ac_try" in
1788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789 *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793 (eval "$ac_try") 2>&5
1794 ac_status=$?
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; }; }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: program exited with status $ac_status" >&5
1800 $as_echo "$as_me: failed program was:" >&5
1801sed 's/^/| /' conftest.$ac_ext >&5
1802
1803 ac_retval=$ac_status
1804fi
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_run
1810
1811# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1812# -------------------------------------------------------
1813# Tests whether HEADER exists and can be compiled using the include files in
1814# INCLUDES, setting the cache variable VAR accordingly.
1815ac_fn_c_check_header_compile ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001820if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826#include <$2>
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 eval "$3=yes"
1830else
1831 eval "$3=no"
1832fi
1833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1834fi
1835eval ac_res=\$$3
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839
1840} # ac_fn_c_check_header_compile
1841
Matthias Kloseb9621712010-04-24 17:59:49 +00001842# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1843# -------------------------------------------
1844# Tests whether TYPE exists after having included INCLUDES, setting cache
1845# variable VAR accordingly.
1846ac_fn_c_check_type ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001851if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 $as_echo_n "(cached) " >&6
1853else
1854 eval "$3=no"
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858int
1859main ()
1860{
1861if (sizeof ($2))
1862 return 0;
1863 ;
1864 return 0;
1865}
1866_ACEOF
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871int
1872main ()
1873{
1874if (sizeof (($2)))
1875 return 0;
1876 ;
1877 return 0;
1878}
1879_ACEOF
1880if ac_fn_c_try_compile "$LINENO"; then :
1881
1882else
1883 eval "$3=yes"
1884fi
1885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886fi
1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893
1894} # ac_fn_c_check_type
1895
1896# ac_fn_c_find_uintX_t LINENO BITS VAR
1897# ------------------------------------
1898# Finds an unsigned integer type with width BITS, setting cache variable VAR
1899# accordingly.
1900ac_fn_c_find_uintX_t ()
1901{
1902 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1904$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001905if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906 $as_echo_n "(cached) " >&6
1907else
1908 eval "$3=no"
1909 # Order is important - never check a type that is potentially smaller
1910 # than half of the expected target width.
1911 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1912 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$ac_includes_default
1916int
1917main ()
1918{
1919static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001920test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001921
1922 ;
1923 return 0;
1924}
1925_ACEOF
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 case $ac_type in #(
1928 uint$2_t) :
1929 eval "$3=yes" ;; #(
1930 *) :
1931 eval "$3=\$ac_type" ;;
1932esac
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001935 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936
1937else
1938 break
1939fi
1940 done
1941fi
1942eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001945 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001946
1947} # ac_fn_c_find_uintX_t
1948
1949# ac_fn_c_find_intX_t LINENO BITS VAR
1950# -----------------------------------
1951# Finds a signed integer type with width BITS, setting cache variable VAR
1952# accordingly.
1953ac_fn_c_find_intX_t ()
1954{
1955 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1957$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001958if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 $as_echo_n "(cached) " >&6
1960else
1961 eval "$3=no"
1962 # Order is important - never check a type that is potentially smaller
1963 # than half of the expected target width.
1964 for ac_type in int$2_t 'int' 'long int' \
1965 'long long int' 'short int' 'signed char'; do
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001969 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001970int
1971main ()
1972{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001973static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001974test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001984 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001985int
1986main ()
1987{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001989 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001990test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997
1998else
1999 case $ac_type in #(
2000 int$2_t) :
2001 eval "$3=yes" ;; #(
2002 *) :
2003 eval "$3=\$ac_type" ;;
2004esac
2005fi
2006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002009 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011else
2012 break
2013fi
2014 done
2015fi
2016eval ac_res=\$$3
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2018$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002019 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021} # ac_fn_c_find_intX_t
2022
2023# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2024# --------------------------------------------
2025# Tries to find the compile-time value of EXPR in a program that includes
2026# INCLUDES, setting VAR accordingly. Returns whether the value could be
2027# computed
2028ac_fn_c_compute_int ()
2029{
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 if test "$cross_compiling" = yes; then
2032 # Depending upon the size, compute the lo and hi bounds.
2033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002040test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_lo=0 ac_mid=0
2048 while :; do
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002056test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=$ac_mid; break
2064else
2065 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2066 if test $ac_lo -le $ac_mid; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002082test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002098test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_lo=$ac_mid; break
2106else
2107 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2108 if test $ac_mid -le $ac_hi; then
2109 ac_lo= ac_hi=
2110 break
2111 fi
2112 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115 done
2116else
2117 ac_lo= ac_hi=
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122# Binary search between lo and hi bounds.
2123while test "x$ac_lo" != "x$ac_hi"; do
2124 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002132test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=$ac_mid
2140else
2141 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144done
2145case $ac_lo in #((
2146?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2147'') ac_retval=1 ;;
2148esac
2149 else
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153static long int longval () { return $2; }
2154static unsigned long int ulongval () { return $2; }
2155#include <stdio.h>
2156#include <stdlib.h>
2157int
2158main ()
2159{
2160
2161 FILE *f = fopen ("conftest.val", "w");
2162 if (! f)
2163 return 1;
2164 if (($2) < 0)
2165 {
2166 long int i = longval ();
2167 if (i != ($2))
2168 return 1;
2169 fprintf (f, "%ld", i);
2170 }
2171 else
2172 {
2173 unsigned long int i = ulongval ();
2174 if (i != ($2))
2175 return 1;
2176 fprintf (f, "%lu", i);
2177 }
2178 /* Do not output a trailing newline, as this causes \r\n confusion
2179 on some platforms. */
2180 return ferror (f) || fclose (f) != 0;
2181
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_run "$LINENO"; then :
2187 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2188else
2189 ac_retval=1
2190fi
2191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2192 conftest.$ac_objext conftest.beam conftest.$ac_ext
2193rm -f conftest.val
2194
2195 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002196 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002197 as_fn_set_status $ac_retval
2198
2199} # ac_fn_c_compute_int
2200
2201# ac_fn_c_check_func LINENO FUNC VAR
2202# ----------------------------------
2203# Tests whether FUNC exists, setting the cache variable VAR accordingly
2204ac_fn_c_check_func ()
2205{
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2208$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002209if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002210 $as_echo_n "(cached) " >&6
2211else
2212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213/* end confdefs.h. */
2214/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2216#define $2 innocuous_$2
2217
2218/* System header to define __stub macros and hopefully few prototypes,
2219 which can conflict with char $2 (); below.
2220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2221 <limits.h> exists even on freestanding compilers. */
2222
2223#ifdef __STDC__
2224# include <limits.h>
2225#else
2226# include <assert.h>
2227#endif
2228
2229#undef $2
2230
2231/* Override any GCC internal prototype to avoid an error.
2232 Use char because int might match the return type of a GCC
2233 builtin and then its argument prototype would still apply. */
2234#ifdef __cplusplus
2235extern "C"
2236#endif
2237char $2 ();
2238/* The GNU C library defines this for functions which it implements
2239 to always fail with ENOSYS. Some functions are actually named
2240 something starting with __ and the normal name is an alias. */
2241#if defined __stub_$2 || defined __stub___$2
2242choke me
2243#endif
2244
2245int
2246main ()
2247{
2248return $2 ();
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253if ac_fn_c_try_link "$LINENO"; then :
2254 eval "$3=yes"
2255else
2256 eval "$3=no"
2257fi
2258rm -f core conftest.err conftest.$ac_objext \
2259 conftest$ac_exeext conftest.$ac_ext
2260fi
2261eval ac_res=\$$3
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2263$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002264 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002265
2266} # ac_fn_c_check_func
2267
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002268# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2269# ---------------------------------------------
2270# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2271# accordingly.
2272ac_fn_c_check_decl ()
2273{
2274 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275 as_decl_name=`echo $2|sed 's/ *(.*//'`
2276 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2278$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2279if eval \${$3+:} false; then :
2280 $as_echo_n "(cached) " >&6
2281else
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$4
2285int
2286main ()
2287{
2288#ifndef $as_decl_name
2289#ifdef __cplusplus
2290 (void) $as_decl_use;
2291#else
2292 (void) $as_decl_name;
2293#endif
2294#endif
2295
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
2301 eval "$3=yes"
2302else
2303 eval "$3=no"
2304fi
2305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306fi
2307eval ac_res=\$$3
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309$as_echo "$ac_res" >&6; }
2310 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311
2312} # ac_fn_c_check_decl
2313
Matthias Kloseb9621712010-04-24 17:59:49 +00002314# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2315# ----------------------------------------------------
2316# Tries to find if the field MEMBER exists in type AGGR, after including
2317# INCLUDES, setting cache variable VAR accordingly.
2318ac_fn_c_check_member ()
2319{
2320 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2322$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002323if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002324 $as_echo_n "(cached) " >&6
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$5
2345int
2346main ()
2347{
2348static $2 ac_aggr;
2349if (sizeof ac_aggr.$3)
2350return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356 eval "$4=yes"
2357else
2358 eval "$4=no"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$4
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002368
2369} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002371This file contains any messages produced by compilers while
2372running configure, to aid debugging if configure makes a mistake.
2373
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002374It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002375generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377 $ $0 $@
2378
2379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002381{
2382cat <<_ASUNAME
2383## --------- ##
2384## Platform. ##
2385## --------- ##
2386
2387hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2388uname -m = `(uname -m) 2>/dev/null || echo unknown`
2389uname -r = `(uname -r) 2>/dev/null || echo unknown`
2390uname -s = `(uname -s) 2>/dev/null || echo unknown`
2391uname -v = `(uname -v) 2>/dev/null || echo unknown`
2392
2393/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2394/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2395
2396/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2397/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2398/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002400/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2401/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2402/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2403
2404_ASUNAME
2405
2406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2407for as_dir in $PATH
2408do
2409 IFS=$as_save_IFS
2410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 $as_echo "PATH: $as_dir"
2412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
2415} >&5
2416
2417cat >&5 <<_ACEOF
2418
2419
2420## ----------- ##
2421## Core tests. ##
2422## ----------- ##
2423
2424_ACEOF
2425
2426
2427# Keep a trace of the command line.
2428# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002429# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002430# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002432ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002433ac_configure_args0=
2434ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002435ac_must_keep_next=false
2436for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002437do
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 for ac_arg
2439 do
2440 case $ac_arg in
2441 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2442 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2443 | -silent | --silent | --silen | --sile | --sil)
2444 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 esac
2448 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002453 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002455 case $ac_arg in
2456 *=* | --config-cache | -C | -disable-* | --disable-* \
2457 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2458 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2459 | -with-* | --with-* | -without-* | --without-* | --x)
2460 case "$ac_configure_args0 " in
2461 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2462 esac
2463 ;;
2464 -* ) ac_must_keep_next=true ;;
2465 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471done
Matthias Kloseb9621712010-04-24 17:59:49 +00002472{ ac_configure_args0=; unset ac_configure_args0;}
2473{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002474
2475# When interrupted or exit'd, cleanup temporary files, and complete
2476# config.log. We remove comments because anyway the quotes in there
2477# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478# WARNING: Use '\'' to represent an apostrophe within the trap.
2479# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002480trap 'exit_status=$?
2481 # Save into config.log some information that might help in debugging.
2482 {
2483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002486## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
2489 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490(
2491 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2492 eval ac_val=\$$ac_var
2493 case $ac_val in #(
2494 *${as_nl}*)
2495 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2497$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
2499 case $ac_var in #(
2500 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2502 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac ;;
2504 esac
2505 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2508 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 "s/'\''/'\''\\\\'\'''\''/g;
2511 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2512 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002513 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002515 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac |
2517 sort
2518)
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002520
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002522## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 echo
2525 for ac_var in $ac_subst_vars
2526 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 eval ac_val=\$$ac_var
2528 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 done | sort
2533 echo
2534
2535 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 echo
2540 for ac_var in $ac_subst_files
2541 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 eval ac_val=\$$ac_var
2543 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 done | sort
2548 echo
2549 fi
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002553## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
2558 fi
2559 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$as_me: caught signal $ac_signal"
2561 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 rm -f core *.core core.conftest.* &&
2564 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002567for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002569done
2570ac_signal=0
2571
2572# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575$as_echo "/* confdefs.h */" > confdefs.h
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577# Predefined preprocessor variables.
2578
2579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_NAME "$PACKAGE_NAME"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583cat >>confdefs.h <<_ACEOF
2584#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2585_ACEOF
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587cat >>confdefs.h <<_ACEOF
2588#define PACKAGE_VERSION "$PACKAGE_VERSION"
2589_ACEOF
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591cat >>confdefs.h <<_ACEOF
2592#define PACKAGE_STRING "$PACKAGE_STRING"
2593_ACEOF
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2597_ACEOF
2598
Matthias Kloseb9621712010-04-24 17:59:49 +00002599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_URL "$PACKAGE_URL"
2601_ACEOF
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603
2604# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002605# Prefer an explicitly selected file to automatically selected ones.
2606ac_site_file1=NONE
2607ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 # We do not want a PATH search for config.site.
2610 case $CONFIG_SITE in #((
2611 -*) ac_site_file1=./$CONFIG_SITE;;
2612 */*) ac_site_file1=$CONFIG_SITE;;
2613 *) ac_site_file1=./$CONFIG_SITE;;
2614 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 ac_site_file1=$prefix/share/config.site
2617 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 ac_site_file1=$ac_default_prefix/share/config.site
2620 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002622for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623do
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 test "x$ac_site_file" = xNONE && continue
2625 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2627$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629 . "$ac_site_file" \
2630 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2632as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002633See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002634 fi
2635done
2636
2637if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # Some versions of bash will fail to source /dev/null (special files
2639 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2640 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2642$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2645 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 esac
2647 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648else
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2650$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 >$cache_file
2652fi
2653
2654# Check that the precious variables saved in the cache have kept the same
2655# value.
2656ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2659 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2661 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 case $ac_old_set,$ac_new_set in
2663 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2665$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 ac_cache_corrupted=: ;;
2667 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2669$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_cache_corrupted=: ;;
2671 ,);;
2672 *)
2673 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 # differences in whitespace do not lead to failure.
2675 ac_old_val_w=`echo x $ac_old_val`
2676 ac_new_val_w=`echo x $ac_new_val`
2677 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2679$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2680 ac_cache_corrupted=:
2681 else
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2683$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2684 eval $ac_var=\$ac_old_val
2685 fi
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2687$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2689$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 fi;;
2691 esac
2692 # Pass precious variables to config.status.
2693 if test "$ac_new_set" = set; then
2694 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 *) ac_arg=$ac_var=$ac_new_val ;;
2697 esac
2698 case " $ac_configure_args " in
2699 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 esac
2702 fi
2703done
2704if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2708$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002709 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711## -------------------- ##
2712## Main body of script. ##
2713## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714
Guido van Rossum7f43da71994-08-01 12:15:30 +00002715ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2719ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720
Guido van Rossum627b2d71993-12-24 10:39:16 +00002721
Michael W. Hudson54241132001-12-07 15:38:26 +00002722
Trent Nelson4d4ec652012-10-16 08:51:24 -04002723
Trent Nelson5595ab52012-10-17 04:47:31 -04002724if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725 # If we're building out-of-tree, we need to make sure the following
2726 # resources get picked up before their $srcdir counterparts.
2727 # Objects/ -> typeslots.inc
2728 # Include/ -> Python-ast.h, graminit.h
2729 # Python/ -> importlib.h
2730 # (A side effect of this is that these resources will automatically be
2731 # regenerated when building out-of-tree, regardless of whether or not
2732 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2733 # off.)
2734 BASECPPFLAGS="-IObjects -IInclude -IPython"
2735else
2736 BASECPPFLAGS=""
2737fi
2738
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739
2740
2741
2742
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002743if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744then
2745# Extract the first word of "hg", so it can be a program name with args.
2746set dummy hg; ac_word=$2
2747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002749if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750 $as_echo_n "(cached) " >&6
2751else
2752 if test -n "$HAS_HG"; then
2753 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2754else
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758 IFS=$as_save_IFS
2759 test -z "$as_dir" && as_dir=.
2760 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762 ac_cv_prog_HAS_HG="found"
2763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2764 break 2
2765 fi
2766done
2767 done
2768IFS=$as_save_IFS
2769
2770 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2771fi
2772fi
2773HAS_HG=$ac_cv_prog_HAS_HG
2774if test -n "$HAS_HG"; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2776$as_echo "$HAS_HG" >&6; }
2777else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2779$as_echo "no" >&6; }
2780fi
2781
2782
2783else
2784HAS_HG=no-repository
2785fi
2786if test $HAS_HG = found
2787then
2788 HGVERSION="hg id -i \$(srcdir)"
2789 HGTAG="hg id -t \$(srcdir)"
2790 HGBRANCH="hg id -b \$(srcdir)"
2791else
2792 HGVERSION=""
2793 HGTAG=""
2794 HGBRANCH=""
2795fi
2796
2797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
2800
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002801ac_aux_dir=
2802for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2803 if test -f "$ac_dir/install-sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install-sh -c"
2806 break
2807 elif test -f "$ac_dir/install.sh"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/install.sh -c"
2810 break
2811 elif test -f "$ac_dir/shtool"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/shtool install -c"
2814 break
2815 fi
2816done
2817if test -z "$ac_aux_dir"; then
2818 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2819fi
2820
2821# These three variables are undocumented and unsupported,
2822# and are intended to be withdrawn in a future Autoconf release.
2823# They can cause serious problems if a builder's source tree is in a directory
2824# whose full name contains unusual characters.
2825ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2826ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2827ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828
2829
2830# Make sure we can run config.sub.
2831$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835$as_echo_n "checking build system type... " >&6; }
2836if ${ac_cv_build+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 ac_build_alias=$build_alias
2840test "x$ac_build_alias" = x &&
2841 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842test "x$ac_build_alias" = x &&
2843 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849$as_echo "$ac_cv_build" >&6; }
2850case $ac_cv_build in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853esac
2854build=$ac_cv_build
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_build
2857shift
2858build_cpu=$1
2859build_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863build_os=$*
2864IFS=$ac_save_IFS
2865case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869$as_echo_n "checking host system type... " >&6; }
2870if ${ac_cv_host+:} false; then :
2871 $as_echo_n "(cached) " >&6
2872else
2873 if test "x$host_alias" = x; then
2874 ac_cv_host=$ac_cv_build
2875else
2876 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878fi
2879
2880fi
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882$as_echo "$ac_cv_host" >&6; }
2883case $ac_cv_host in
2884*-*-*) ;;
2885*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886esac
2887host=$ac_cv_host
2888ac_save_IFS=$IFS; IFS='-'
2889set x $ac_cv_host
2890shift
2891host_cpu=$1
2892host_vendor=$2
2893shift; shift
2894# Remember, the first character of IFS is used to create $*,
2895# except with old shells:
2896host_os=$*
2897IFS=$ac_save_IFS
2898case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002902if test "$cross_compiling" = yes; then
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2904$as_echo_n "checking for python interpreter for cross build... " >&6; }
2905 if test -z "$PYTHON_FOR_BUILD"; then
2906 for interp in python$PACKAGE_VERSION python3 python; do
2907 which $interp >/dev/null 2>&1 || continue
2908 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2909 break
2910 fi
2911 interp=
2912 done
2913 if test x$interp = x; then
2914 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2915 fi
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2917$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002918 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919 fi
2920else
2921 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2922fi
2923
2924
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Benjamin Petersond23f8222009-04-05 19:13:16 +00002926if test "$prefix" != "/"; then
2927 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2928fi
2929
2930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
2932
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002933# We don't use PACKAGE_ variables, and they cause conflicts
2934# with other autoconf-based packages that include Python.h
2935grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2936rm confdefs.h
2937mv confdefs.h.new confdefs.h
2938
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002939
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002940VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002941
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002942# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002943
2944SOVERSION=1.0
2945
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002946# The later defininition of _XOPEN_SOURCE disables certain features
2947# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2948
Matthias Kloseb9621712010-04-24 17:59:49 +00002949$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002950
2951
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002952# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2953# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2954# them.
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002957
2958
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002959# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2960# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2961# them.
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002964
2965
Martin v. Löwisd6320502004-08-12 13:45:08 +00002966# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2967# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002970
2971
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002977
2978
2979
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002980define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002982# Arguments passed to configure.
2983
2984CONFIG_ARGS="$ac_configure_args"
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2987$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002989if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002991 case $enableval in
2992 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002993 # Locate the best usable SDK, see Mac/README.txt for more
2994 # information
2995 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2996 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002997 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002998 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2999 if test ! -d "${enableval}"
3000 then
3001 enableval=/
3002 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 ;;
3005 esac
3006 case $enableval in
3007 no)
3008 UNIVERSALSDK=
3009 enable_universalsdk=
3010 ;;
3011 *)
3012 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 if test ! -d "${UNIVERSALSDK}"
3014 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003015 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021else
3022
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028if test -n "${UNIVERSALSDK}"
3029then
Matthias Kloseb9621712010-04-24 17:59:49 +00003030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3031$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032else
Matthias Kloseb9621712010-04-24 17:59:49 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3034$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003038
3039
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040# For backward compatibility reasons we prefer to select '32-bit' if available,
3041# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003042UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003043if test "`uname -s`" = "Darwin"
3044then
3045 if test -n "${UNIVERSALSDK}"
3046 then
3047 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3048 then
3049 UNIVERSAL_ARCHS="intel"
3050 fi
3051 fi
3052fi
3053
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3056$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057
3058# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003059if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3062$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063 UNIVERSAL_ARCHS="$withval"
3064
3065else
3066
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3068$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069
3070fi
3071
3072
3073
3074
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003075
3076# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003078 withval=$with_framework_name;
3079 PYTHONFRAMEWORK=${withval}
3080 PYTHONFRAMEWORKDIR=${withval}.framework
3081 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3082
3083else
3084
3085 PYTHONFRAMEWORK=Python
3086 PYTHONFRAMEWORKDIR=Python.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3088
3089fi
3090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003094 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003096 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 esac
3098 case $enableval in
3099 no)
3100 PYTHONFRAMEWORK=
3101 PYTHONFRAMEWORKDIR=no-framework
3102 PYTHONFRAMEWORKPREFIX=
3103 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104 FRAMEWORKINSTALLFIRST=
3105 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003106 FRAMEWORKALTINSTALLFIRST=
3107 FRAMEWORKALTINSTALLLAST=
3108 if test "x${prefix}" = "xNONE"; then
3109 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003114 ;;
3115 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003116 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003119 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003120 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3121 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003122 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 if test "x${prefix}" = "xNONE" ; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003126
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130
3131 case "${enableval}" in
3132 /System*)
3133 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3134 if test "${prefix}" = "NONE" ; then
3135 # See below
3136 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3137 fi
3138 ;;
3139
3140 /Library*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143
3144 */Library/Frameworks)
3145 MDIR="`dirname "${enableval}"`"
3146 MDIR="`dirname "${MDIR}"`"
3147 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3148
3149 if test "${prefix}" = "NONE"; then
3150 # User hasn't specified the
3151 # --prefix option, but wants to install
3152 # the framework in a non-default location,
3153 # ensure that the compatibility links get
3154 # installed relative to that prefix as well
3155 # instead of in /usr/local.
3156 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3157 fi
3158 ;;
3159
3160 *)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163 esac
3164
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003167 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003173 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3174
3175 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3176
Jack Jansene578a632001-08-15 01:27:14 +00003177 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003178
Guido van Rossum563e7081996-09-10 18:20:48 +00003179else
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Jack Jansene578a632001-08-15 01:27:14 +00003181 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003183 PYTHONFRAMEWORKPREFIX=
3184 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 FRAMEWORKINSTALLFIRST=
3186 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003187 FRAMEWORKALTINSTALLFIRST=
3188 FRAMEWORKALTINSTALLLAST=
3189 if test "x${prefix}" = "xNONE" ; then
3190 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3191 else
3192 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3193 fi
Jack Jansene578a632001-08-15 01:27:14 +00003194 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003195
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197fi
3198
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
3200
Michael W. Hudson54241132001-12-07 15:38:26 +00003201
3202
3203
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206
3207
3208
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003209
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003212## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003213## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003214##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215# Set name for machine-dependent library files
3216
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3218$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219if test -z "$MACHDEP"
3220then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003221 # avoid using uname for cross builds
3222 if test "$cross_compiling" = yes; then
3223 # ac_sys_system and ac_sys_release are only used for setting
3224 # `define_xopen_source' in the case statement below. For the
3225 # current supported cross builds, this macro is not adjusted.
3226 case "$host" in
3227 *-*-linux*)
3228 ac_sys_system=Linux
3229 ;;
3230 *-*-cygwin*)
3231 ac_sys_system=Cygwin
3232 ;;
3233 *)
3234 # for now, limit cross builds to known configurations
3235 MACHDEP="unknown"
3236 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3237 esac
3238 ac_sys_release=
3239 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003240 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003241 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003242 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003243 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003245 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 fi
3248 ac_md_system=`echo $ac_sys_system |
3249 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3250 ac_md_release=`echo $ac_sys_release |
3251 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3252 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003253
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003255 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003256 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003257 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003258 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003259 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261fi
Guido van Rossum91922671997-10-09 20:24:13 +00003262
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003263
3264if test "$cross_compiling" = yes; then
3265 case "$host" in
3266 *-*-linux*)
3267 case "$host_cpu" in
3268 arm*)
3269 _host_cpu=arm
3270 ;;
3271 *)
3272 _host_cpu=$host_cpu
3273 esac
3274 ;;
3275 *-*-cygwin*)
3276 _host_cpu=
3277 ;;
3278 *)
3279 # for now, limit cross builds to known configurations
3280 MACHDEP="unknown"
3281 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3282 esac
3283 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3284fi
3285
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003286# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3287# disable features if it is defined, without any means to access these
3288# features as extensions. For these systems, we skip the definition of
3289# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3290# some feature, make sure there is no alternative way to access this
3291# feature. Also, when using wildcards, make sure you have verified the
3292# need for not defining _XOPEN_SOURCE on all systems matching the
3293# wildcard, and that the wildcard does not include future systems
3294# (which may remove their limitations).
3295case $ac_sys_system/$ac_sys_release in
3296 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3297 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003298 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003299 # In addition, Stefan Krah confirms that issue #1244610 exists through
3300 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003301 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003302 define_xopen_source=no
3303 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3304 # also defined. This can be overridden by defining _BSD_SOURCE
3305 # As this has a different meaning on Linux, only define it on OpenBSD
3306
Matthias Kloseb9621712010-04-24 17:59:49 +00003307$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003308
3309 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003310 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003311 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3312 # also defined. This can be overridden by defining _BSD_SOURCE
3313 # As this has a different meaning on Linux, only define it on OpenBSD
3314
Matthias Kloseb9621712010-04-24 17:59:49 +00003315$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003316
3317 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003318 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3319 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3320 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003321 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003323 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3324 # request to enable features supported by the standard as a request
3325 # to disable features not supported by the standard. The best way
3326 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3327 # entirely and define __EXTENSIONS__ instead.
3328 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003329 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003330 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3331 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003332 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003333 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003334 define_xopen_source=no;;
3335 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003336 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003338 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003339 # On FreeBSD 4, the math functions C89 does not cover are never defined
3340 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3341 FreeBSD/4.*)
3342 define_xopen_source=no;;
3343 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3344 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3345 # identifies itself as Darwin/7.*
3346 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3347 # disables platform specific features beyond repair.
3348 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3349 # has no effect, don't bother defining them
3350 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003351 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003352 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003353 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003354 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3355 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3356 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003357 AIX/4)
3358 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003359 AIX/5)
3360 if test `uname -r` -eq 1; then
3361 define_xopen_source=no
3362 fi
3363 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003364 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3365 # defining NI_NUMERICHOST.
3366 QNX/6.3.2)
3367 define_xopen_source=no
3368 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003370esac
3371
3372if test $define_xopen_source = yes
3373then
Victor Stinner14d098d2011-09-07 22:29:43 +02003374 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003375
Victor Stinner14d098d2011-09-07 22:29:43 +02003376$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003377
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003378
3379 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3380 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3381 # several APIs are not declared. Since this is also needed in some
3382 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003383
Matthias Kloseb9621712010-04-24 17:59:49 +00003384$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003385
3386
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003387
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003388$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003389
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003390fi
3391
Guido van Rossum91922671997-10-09 20:24:13 +00003392#
3393# SGI compilers allow the specification of the both the ABI and the
3394# ISA on the command line. Depending on the values of these switches,
3395# different and often incompatable code will be generated.
3396#
3397# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3398# thus supply support for various ABI/ISA combinations. The MACHDEP
3399# variable is also adjusted.
3400#
3401
3402if test ! -z "$SGI_ABI"
3403then
3404 CC="cc $SGI_ABI"
3405 LDFLAGS="$SGI_ABI $LDFLAGS"
3406 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3409$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003410
Jack Jansen6b08a402004-06-03 12:41:45 +00003411# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3412# it may influence the way we can build extensions, so distutils
3413# needs to check it
3414
Thomas Wouters477c8d52006-05-27 19:21:47 +00003415
Jack Jansen6b08a402004-06-03 12:41:45 +00003416CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003417EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003418
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003420
3421# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3422# for debug/optimization stuff. BASECFLAGS is for flags that are required
3423# just to get things to compile and link. Users are free to override OPT
3424# when running configure or make. The build should not break if they do.
3425# BASECFLAGS should generally not be messed with, however.
3426
3427# XXX shouldn't some/most/all of this code be merged with the stuff later
3428# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3430$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003436 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003437 without_gcc=yes;;
3438 yes) CC=gcc
3439 without_gcc=no;;
3440 *) CC=$withval
3441 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003442 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003443else
Martin v. Löwis11437992002-04-12 09:54:03 +00003444
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003445 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003446 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003447 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003448 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003449 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450fi
3451
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3453$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003454
Guido van Rossum8b131c51995-03-09 14:10:13 +00003455# If the user switches compilers, we can't believe the cache
3456if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3457then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003458 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003459(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460fi
3461
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003462# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3463# when the compiler supports them, but we don't always want -O2, and
3464# we set -g later.
3465if test -z "$CFLAGS"; then
3466 CFLAGS=
3467fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003468
3469if test "$ac_sys_system" = "Darwin"
3470then
3471 # Compiler selection on MacOSX is more complicated than
3472 # AC_PROG_CC can handle, see Mac/README.txt for more
3473 # information
3474 if test -z "${CC}"
3475 then
3476 found_gcc=
3477 found_clang=
3478 as_save_IFS=$IFS; IFS=:
3479 for as_dir in $PATH
3480 do
3481 IFS=$as_save_IFS
3482 if test -x $as_dir/gcc; then
3483 if test -z "${found_gcc}"; then
3484 found_gcc=$as_dir/gcc
3485 fi
3486 fi
3487 if test -x $as_dir/clang; then
3488 if test -z "${found_clang}"; then
3489 found_clang=$as_dir/clang
3490 fi
3491 fi
3492 done
3493 IFS=$as_save_IFS
3494
3495 if test -n "$found_gcc" -a -n "$found_clang"
3496 then
3497 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3498 then
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3500$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3501 CC="$found_clang"
3502 CXX="$found_clang++"
3503 fi
3504
3505
3506 elif test -z "$found_gcc" -a -n "$found_clang"
3507 then
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3509$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3510 CC="$found_clang"
3511 CXX="$found_clang++"
3512
3513 elif test -z "$found_gcc" -a -z "$found_clang"
3514 then
3515 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3516 if test -n "${found_clang}"
3517 then
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3519$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3520 CC="${found_clang}"
3521 CXX="`/usr/bin/xcrun -find clang++`"
3522
3523 # else: use default behaviour
3524 fi
3525 fi
3526 fi
3527fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003528ac_ext=c
3529ac_cpp='$CPP $CPPFLAGS'
3530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3532ac_compiler_gnu=$ac_cv_c_compiler_gnu
3533if test -n "$ac_tool_prefix"; then
3534 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3535set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003538if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540else
3541 if test -n "$CC"; then
3542 ac_cv_prog_CC="$CC" # Let the user override the test.
3543else
Martin v. Löwis11437992002-04-12 09:54:03 +00003544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003550 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 break 2
3554 fi
3555done
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003558
Jack Jansendd19cf82001-12-06 22:36:17 +00003559fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003562if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3564$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003565else
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003568fi
3569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572if test -z "$ac_cv_prog_CC"; then
3573 ac_ct_CC=$CC
3574 # Extract the first word of "gcc", so it can be a program name with args.
3575set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003580else
3581 if test -n "$ac_ct_CC"; then
3582 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3583else
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
3599fi
3600fi
3601ac_ct_CC=$ac_cv_prog_ac_ct_CC
3602if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3604$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 if test "x$ac_ct_CC" = x; then
3611 CC=""
3612 else
3613 case $cross_compiling:$ac_tool_warned in
3614yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617ac_tool_warned=yes ;;
3618esac
3619 CC=$ac_ct_CC
3620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624
Jack Jansendd19cf82001-12-06 22:36:17 +00003625if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 if test -n "$ac_tool_prefix"; then
3627 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003628set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003643 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666if test -z "$CC"; then
3667 # Extract the first word of "cc", so it can be a program name with args.
3668set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003677 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3686 ac_prog_rejected=yes
3687 continue
3688 fi
3689 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697if test $ac_prog_rejected = yes; then
3698 # We found a bogon in the path, so make sure we never use it.
3699 set dummy $ac_cv_prog_CC
3700 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702 # We chose a different compiler from the bogus one.
3703 # However, it has the same basename, so the bogon will be chosen
3704 # first if we set CC to just the basename; use the full file name.
3705 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003706 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 fi
3708fi
3709fi
3710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715else
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 do
3726 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003742 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
3751fi
3752fi
3753CC=$ac_cv_prog_CC
3754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 test -n "$CC" && break
3764 done
3765fi
3766if test -z "$CC"; then
3767 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769do
3770 # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003776else
3777 if test -n "$ac_ct_CC"; then
3778 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003786 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 break 2
3790 fi
3791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
3796fi
3797ac_ct_CC=$ac_cv_prog_ac_ct_CC
3798if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3800$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$ac_ct_CC" && break
3808done
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 if test "x$ac_ct_CC" = x; then
3811 CC=""
3812 else
3813 case $cross_compiling:$ac_tool_warned in
3814yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817ac_tool_warned=yes ;;
3818esac
3819 CC=$ac_ct_CC
3820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822
3823fi
3824
3825
Matthias Kloseb9621712010-04-24 17:59:49 +00003826test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003828as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003829See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
3831# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3833set X $ac_compile
3834ac_compiler=$2
3835for ac_option in --version -v -V -qversion; do
3836 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837case "(($ac_try" in
3838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3839 *) ac_try_echo=$ac_try;;
3840esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3842$as_echo "$ac_try_echo"; } >&5
3843 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 if test -s conftest.err; then
3846 sed '10a\
3847... rest of stderr output deleted ...
3848 10q' conftest.err >conftest.er1
3849 cat conftest.er1 >&5
3850 fi
3851 rm -f conftest.er1 conftest.err
3852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3853 test $ac_status = 0; }
3854done
Martin v. Löwis11437992002-04-12 09:54:03 +00003855
Matthias Kloseb9621712010-04-24 17:59:49 +00003856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003857/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859int
3860main ()
3861{
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003868ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003869# Try to create an executable without -o first, disregard a.out.
3870# It will help us diagnose broken compilers, and finding out an intuition
3871# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3873$as_echo_n "checking whether the C compiler works... " >&6; }
3874ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3875
3876# The possible output files:
3877ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_rmfiles=
3880for ac_file in $ac_files
3881do
3882 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3885 esac
3886done
3887rm -f $ac_rmfiles
3888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890case "(($ac_try" in
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3893esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3901# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3902# in a Makefile. We should not override ac_cv_exeext if it was cached,
3903# so that the user can short-circuit this test for compilers unknown to
3904# Autoconf.
3905for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003906do
3907 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910 ;;
3911 [ab].out )
3912 # We found the default executable, but exeext='' is most
3913 # certainly right.
3914 break;;
3915 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 then :; else
3918 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3919 fi
3920 # We set ac_cv_exeext here because the later test for it is not
3921 # safe: cross compilers may not add the suffix if given an `-o'
3922 # argument, so we may need to know it at that point already.
3923 # Even if this section looks crufty: it has the advantage of
3924 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925 break;;
3926 * )
3927 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 esac
3929done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930test "$ac_cv_exeext" = no && ac_cv_exeext=
3931
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003932else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_file=''
3934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if test -z "$ac_file"; then :
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003939sed 's/^/| /' conftest.$ac_ext >&5
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003945else
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3947$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3950$as_echo_n "checking for C compiler default output file name... " >&6; }
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3952$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954
Matthias Kloseb9621712010-04-24 17:59:49 +00003955rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3958$as_echo_n "checking for suffix of executables... " >&6; }
3959if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3971# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3972# work properly (i.e., refer to `conftest.exe'), while it won't with
3973# `rm'.
3974for ac_file in conftest.exe conftest conftest.*; do
3975 test -f "$ac_file" || continue
3976 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3979 break;;
3980 * ) break;;
3981 esac
3982done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f conftest conftest$ac_cv_exeext
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3991$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992
3993rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003994EXEEXT=$ac_cv_exeext
3995ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997/* end confdefs.h. */
3998#include <stdio.h>
3999int
4000main ()
4001{
4002FILE *f = fopen ("conftest.out", "w");
4003 return ferror (f) || fclose (f) != 0;
4004
4005 ;
4006 return 0;
4007}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files conftest.out"
4010# Check that the compiler produces executables we can run. If not, either
4011# the compiler is broken, or we cross compile.
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4013$as_echo_n "checking whether we are cross compiling... " >&6; }
4014if test "$cross_compiling" != yes; then
4015 { { ac_try="$ac_link"
4016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
4020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_link") 2>&5
4023 ac_status=$?
4024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }
4026 if { ac_try='./conftest$ac_cv_exeext'
4027 { { case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_try") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; }; then
4037 cross_compiling=no
4038 else
4039 if test "$cross_compiling" = maybe; then
4040 cross_compiling=yes
4041 else
4042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004045If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004046See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 fi
4048 fi
4049fi
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4051$as_echo "$cross_compiling" >&6; }
4052
4053rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4054ac_clean_files=$ac_clean_files_save
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4056$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004057if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 $as_echo_n "(cached) " >&6
4059else
4060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061/* end confdefs.h. */
4062
4063int
4064main ()
4065{
4066
4067 ;
4068 return 0;
4069}
4070_ACEOF
4071rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004072if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 for ac_file in conftest.o conftest.obj conftest.*; do
4084 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4088 break;;
4089 esac
4090done
4091else
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004093sed 's/^/| /' conftest.$ac_ext >&5
4094
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004097as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004099fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4103$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104OBJEXT=$ac_cv_objext
4105ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4107$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004108if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004113
Martin v. Löwis11437992002-04-12 09:54:03 +00004114int
4115main ()
4116{
4117#ifndef __GNUC__
4118 choke me
4119#endif
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_compiler_gnu=yes
4127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004131ac_cv_c_compiler_gnu=$ac_compiler_gnu
4132
4133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4135$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4136if test $ac_compiler_gnu = yes; then
4137 GCC=yes
4138else
4139 GCC=
4140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141ac_test_CFLAGS=${CFLAGS+set}
4142ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4144$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004145if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004147else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 ac_save_c_werror_flag=$ac_c_werror_flag
4149 ac_c_werror_flag=yes
4150 ac_cv_prog_cc_g=no
4151 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004164 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 CFLAGS=""
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180else
4181 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184/* end confdefs.h. */
4185
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202 ac_c_werror_flag=$ac_save_c_werror_flag
4203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4205$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004208elif test $ac_cv_prog_cc_g = yes; then
4209 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 CFLAGS="-g -O2"
4211 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 fi
4214else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 if test "$GCC" = yes; then
4216 CFLAGS="-O2"
4217 else
4218 CFLAGS=
4219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4222$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004223if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004227ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
4230#include <stdarg.h>
4231#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004232#include <sys/types.h>
4233#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4235struct buf { int x; };
4236FILE * (*rcsopen) (struct buf *, struct stat *, int);
4237static char *e (p, i)
4238 char **p;
4239 int i;
4240{
4241 return p[i];
4242}
4243static char *f (char * (*g) (char **, int), char **p, ...)
4244{
4245 char *s;
4246 va_list v;
4247 va_start (v,p);
4248 s = g (p, va_arg (v,int));
4249 va_end (v);
4250 return s;
4251}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252
4253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4254 function prototypes and stuff, but not '\xHH' hex character constants.
4255 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4258 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4263 inside strings and character constants. */
4264#define FOO(x) 'x'
4265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4266
Skip Montanaro6dead952003-09-25 14:50:04 +00004267int test (int i, double x);
4268struct s1 {int (*f) (int a);};
4269struct s2 {int (*f) (double a);};
4270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4271int argc;
4272char **argv;
4273int
4274main ()
4275{
4276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4277 ;
4278 return 0;
4279}
4280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4282 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004283do
4284 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext
4289 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292CC=$ac_save_CC
4293
4294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295# AC_CACHE_VAL
4296case "x$ac_cv_prog_cc_c89" in
4297 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4299$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4302$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004303 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004318
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004319
4320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4322$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004327
4328 case $withval in
4329 no) with_cxx_main=no
4330 MAINCC='$(CC)';;
4331 yes) with_cxx_main=yes
4332 MAINCC='$(CXX)';;
4333 *) with_cxx_main=yes
4334 MAINCC=$withval
4335 if test -z "$CXX"
4336 then
4337 CXX=$withval
4338 fi;;
4339 esac
4340else
4341
4342 with_cxx_main=no
4343 MAINCC='$(CC)'
4344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345fi
4346
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4348$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004349
4350preset_cxx="$CXX"
4351if test -z "$CXX"
4352then
4353 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004354 gcc) if test -n "$ac_tool_prefix"; then
4355 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4356set dummy ${ac_tool_prefix}g++; ac_word=$2
4357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4358$as_echo_n "checking for $ac_word... " >&6; }
4359if ${ac_cv_path_CXX+:} false; then :
4360 $as_echo_n "(cached) " >&6
4361else
4362 case $CXX in
4363 [\\/]* | ?:[\\/]*)
4364 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4365 ;;
4366 *)
4367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4368for as_dir in notfound
4369do
4370 IFS=$as_save_IFS
4371 test -z "$as_dir" && as_dir=.
4372 for ac_exec_ext in '' $ac_executable_extensions; do
4373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4374 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4376 break 2
4377 fi
4378done
4379 done
4380IFS=$as_save_IFS
4381
4382 ;;
4383esac
4384fi
4385CXX=$ac_cv_path_CXX
4386if test -n "$CXX"; then
4387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4388$as_echo "$CXX" >&6; }
4389else
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391$as_echo "no" >&6; }
4392fi
4393
4394
4395fi
4396if test -z "$ac_cv_path_CXX"; then
4397 ac_pt_CXX=$CXX
4398 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004399set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004402if ${ac_cv_path_ac_pt_CXX+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 case $ac_pt_CXX in
4406 [\\/]* | ?:[\\/]*)
4407 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4408 ;;
4409 *)
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in notfound
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 for ac_exec_ext in '' $ac_executable_extensions; do
4416 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4417 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419 break 2
4420 fi
4421done
4422 done
4423IFS=$as_save_IFS
4424
4425 ;;
4426esac
4427fi
4428ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4429if test -n "$ac_pt_CXX"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4431$as_echo "$ac_pt_CXX" >&6; }
4432else
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437 if test "x$ac_pt_CXX" = x; then
4438 CXX="g++"
4439 else
4440 case $cross_compiling:$ac_tool_warned in
4441yes:)
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4443$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4444ac_tool_warned=yes ;;
4445esac
4446 CXX=$ac_pt_CXX
4447 fi
4448else
4449 CXX="$ac_cv_path_CXX"
4450fi
4451 ;;
4452 cc) if test -n "$ac_tool_prefix"; then
4453 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4454set dummy ${ac_tool_prefix}c++; ac_word=$2
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4456$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004457if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004459else
4460 case $CXX in
4461 [\\/]* | ?:[\\/]*)
4462 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4463 ;;
4464 *)
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in notfound
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004472 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004474 break 2
4475 fi
4476done
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004479
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480 ;;
4481esac
4482fi
4483CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004484if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4486$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004487else
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4489$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004492
4493fi
4494if test -z "$ac_cv_path_CXX"; then
4495 ac_pt_CXX=$CXX
4496 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004500if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004503 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004505 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 ;;
4507 *)
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in notfound
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004514 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4515 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 break 2
4518 fi
4519done
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ;;
4524esac
4525fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004526ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4527if test -n "$ac_pt_CXX"; then
4528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4529$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004534
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535 if test "x$ac_pt_CXX" = x; then
4536 CXX="c++"
4537 else
4538 case $cross_compiling:$ac_tool_warned in
4539yes:)
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4542ac_tool_warned=yes ;;
4543esac
4544 CXX=$ac_pt_CXX
4545 fi
4546else
4547 CXX="$ac_cv_path_CXX"
4548fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004550 clang|*/clang) if test -n "$ac_tool_prefix"; then
4551 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4552set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554$as_echo_n "checking for $ac_word... " >&6; }
4555if ${ac_cv_path_CXX+:} false; then :
4556 $as_echo_n "(cached) " >&6
4557else
4558 case $CXX in
4559 [\\/]* | ?:[\\/]*)
4560 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4561 ;;
4562 *)
4563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in notfound
4565do
4566 IFS=$as_save_IFS
4567 test -z "$as_dir" && as_dir=.
4568 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004570 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572 break 2
4573 fi
4574done
4575 done
4576IFS=$as_save_IFS
4577
Ned Deilycbfb9a52012-06-23 16:02:19 -07004578 ;;
4579esac
4580fi
4581CXX=$ac_cv_path_CXX
4582if test -n "$CXX"; then
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4584$as_echo "$CXX" >&6; }
4585else
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004590
4591fi
4592if test -z "$ac_cv_path_CXX"; then
4593 ac_pt_CXX=$CXX
4594 # Extract the first word of "clang++", so it can be a program name with args.
4595set dummy clang++; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_ac_pt_CXX+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 case $ac_pt_CXX in
4602 [\\/]* | ?:[\\/]*)
4603 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4604 ;;
4605 *)
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in notfound
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
4612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
4617done
4618 done
4619IFS=$as_save_IFS
4620
4621 ;;
4622esac
4623fi
4624ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4625if test -n "$ac_pt_CXX"; then
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4627$as_echo "$ac_pt_CXX" >&6; }
4628else
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633 if test "x$ac_pt_CXX" = x; then
4634 CXX="clang++"
4635 else
4636 case $cross_compiling:$ac_tool_warned in
4637yes:)
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4640ac_tool_warned=yes ;;
4641esac
4642 CXX=$ac_pt_CXX
4643 fi
4644else
4645 CXX="$ac_cv_path_CXX"
4646fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004647 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648 esac
4649 if test "$CXX" = "notfound"
4650 then
4651 CXX=""
4652 fi
4653fi
4654if test -z "$CXX"
4655then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 if test -n "$ac_tool_prefix"; then
4657 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4658 do
4659 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004663if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665else
4666 if test -n "$CXX"; then
4667 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4668else
4669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672 IFS=$as_save_IFS
4673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4676 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678 break 2
4679 fi
4680done
Matthias Kloseb9621712010-04-24 17:59:49 +00004681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004682IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004683
4684fi
4685fi
4686CXX=$ac_cv_prog_CXX
4687if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4689$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690else
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693fi
4694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004695
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 test -n "$CXX" && break
4697 done
4698fi
4699if test -z "$CXX"; then
4700 ac_ct_CXX=$CXX
4701 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4702do
4703 # Extract the first word of "$ac_prog", so it can be a program name with args.
4704set dummy $ac_prog; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709else
4710 if test -n "$ac_ct_CXX"; then
4711 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4712else
4713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH
4715do
4716 IFS=$as_save_IFS
4717 test -z "$as_dir" && as_dir=.
4718 for ac_exec_ext in '' $ac_executable_extensions; do
4719 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4720 ac_cv_prog_ac_ct_CXX="$ac_prog"
4721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4722 break 2
4723 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725 done
4726IFS=$as_save_IFS
4727
4728fi
4729fi
4730ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4731if test -n "$ac_ct_CXX"; then
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4733$as_echo "$ac_ct_CXX" >&6; }
4734else
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
4737fi
4738
4739
4740 test -n "$ac_ct_CXX" && break
4741done
4742
4743 if test "x$ac_ct_CXX" = x; then
4744 CXX="notfound"
4745 else
4746 case $cross_compiling:$ac_tool_warned in
4747yes:)
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4750ac_tool_warned=yes ;;
4751esac
4752 CXX=$ac_ct_CXX
4753 fi
4754fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755
4756 if test "$CXX" = "notfound"
4757 then
4758 CXX=""
4759 fi
4760fi
4761if test "$preset_cxx" != "$CXX"
4762then
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764
4765 By default, distutils will build C++ extension modules with \"$CXX\".
4766 If this is not intended, then set CXX on the configure command line.
4767 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004768$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
4770 By default, distutils will build C++ extension modules with \"$CXX\".
4771 If this is not intended, then set CXX on the configure command line.
4772 " >&2;}
4773fi
4774
4775
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4777$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4778save_LDFLAGS="$LDFLAGS"
4779LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004780
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782/* end confdefs.h. */
4783
4784int
4785main ()
4786{
4787
4788 ;
4789 return 0;
4790}
4791_ACEOF
4792if ac_fn_c_try_link "$LINENO"; then :
4793 NO_AS_NEEDED="-Wl,--no-as-needed"
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4795$as_echo "yes" >&6; }
4796else
4797 NO_AS_NEEDED=""
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801rm -f core conftest.err conftest.$ac_objext \
4802 conftest$ac_exeext conftest.$ac_ext
4803LDFLAGS="$save_LDFLAGS"
4804
4805
4806
4807# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004808ac_ext=c
4809ac_cpp='$CPP $CPPFLAGS'
4810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4812ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4814$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004815# On Suns, sometimes $CPP names a directory.
4816if test -n "$CPP" && test -d "$CPP"; then
4817 CPP=
4818fi
4819if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004820 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004822else
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 # Double quotes because CPP needs to be expanded
4824 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4825 do
4826 ac_preproc_ok=false
4827for ac_c_preproc_warn_flag in '' yes
4828do
4829 # Use a header file that comes with gcc, so configuring glibc
4830 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004831 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4832 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004833 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004836/* end confdefs.h. */
4837#ifdef __STDC__
4838# include <limits.h>
4839#else
4840# include <assert.h>
4841#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004842 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004844if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004845
Matthias Kloseb9621712010-04-24 17:59:49 +00004846else
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 # Broken: fails on valid input.
4848continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004849fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004850rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004852 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004856#include <ac_nonexistent.h>
4857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 # Broken: success on invalid input.
4860continue
4861else
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 # Passes both tests.
4863ac_preproc_ok=:
4864break
4865fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004866rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004867
4868done
4869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004870rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004871if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 break
4873fi
4874
4875 done
4876 ac_cv_prog_CPP=$CPP
4877
4878fi
4879 CPP=$ac_cv_prog_CPP
4880else
4881 ac_cv_prog_CPP=$CPP
4882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4884$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004885ac_preproc_ok=false
4886for ac_c_preproc_warn_flag in '' yes
4887do
4888 # Use a header file that comes with gcc, so configuring glibc
4889 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004890 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4891 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # On the NeXT, cc -E runs the code through the compiler's parser,
4893 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004895/* end confdefs.h. */
4896#ifdef __STDC__
4897# include <limits.h>
4898#else
4899# include <assert.h>
4900#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004901 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004904
Matthias Kloseb9621712010-04-24 17:59:49 +00004905else
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 # Broken: fails on valid input.
4907continue
4908fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004909rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004911 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004915#include <ac_nonexistent.h>
4916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004917if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # Broken: success on invalid input.
4919continue
4920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Passes both tests.
4922ac_preproc_ok=:
4923break
4924fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004925rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004926
4927done
4928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004929rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004930if $ac_preproc_ok; then :
4931
Martin v. Löwis11437992002-04-12 09:54:03 +00004932else
Matthias Kloseb9621712010-04-24 17:59:49 +00004933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004935as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004936See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004937fi
4938
4939ac_ext=c
4940ac_cpp='$CPP $CPPFLAGS'
4941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4943ac_compiler_gnu=$ac_cv_c_compiler_gnu
4944
4945
Matthias Kloseb9621712010-04-24 17:59:49 +00004946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004948if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004950else
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004952 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 # Loop through the user's path and test for each of PROGNAME-LIST
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 for ac_prog in grep ggrep; do
4960 for ac_exec_ext in '' $ac_executable_extensions; do
4961 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004962 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004963# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004964 # Check for GNU $ac_path_GREP
4965case `"$ac_path_GREP" --version 2>&1` in
4966*GNU*)
4967 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4968*)
4969 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004971 while :
4972 do
4973 cat "conftest.in" "conftest.in" >"conftest.tmp"
4974 mv "conftest.tmp" "conftest.in"
4975 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004977 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4978 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4981 # Best one so far, save it but keep looking for a better one
4982 ac_cv_path_GREP="$ac_path_GREP"
4983 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004984 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # 10*(2^10) chars as input seems more than enough
4986 test $ac_count -gt 10 && break
4987 done
4988 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4989esac
4990
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 $ac_path_GREP_found && break 3
4992 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004993 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004996 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004997 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999else
5000 ac_cv_path_GREP=$GREP
5001fi
5002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5005$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006 GREP="$ac_cv_path_GREP"
5007
5008
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5010$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005011if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013else
5014 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5015 then ac_cv_path_EGREP="$GREP -E"
5016 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 # Loop through the user's path and test for each of PROGNAME-LIST
5020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5022do
5023 IFS=$as_save_IFS
5024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 for ac_prog in egrep; do
5026 for ac_exec_ext in '' $ac_executable_extensions; do
5027 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005029# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030 # Check for GNU $ac_path_EGREP
5031case `"$ac_path_EGREP" --version 2>&1` in
5032*GNU*)
5033 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5034*)
5035 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005037 while :
5038 do
5039 cat "conftest.in" "conftest.in" >"conftest.tmp"
5040 mv "conftest.tmp" "conftest.in"
5041 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5044 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5047 # Best one so far, save it but keep looking for a better one
5048 ac_cv_path_EGREP="$ac_path_EGREP"
5049 ac_path_EGREP_max=$ac_count
5050 fi
5051 # 10*(2^10) chars as input seems more than enough
5052 test $ac_count -gt 10 && break
5053 done
5054 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5055esac
5056
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 $ac_path_EGREP_found && break 3
5058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005063 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065else
5066 ac_cv_path_EGREP=$EGREP
5067fi
5068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 fi
5070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5072$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005074
5075
Matthias Kloseb9621712010-04-24 17:59:49 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5077$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005078if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n "(cached) " >&6
5080else
5081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005082/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005083#include <stdlib.h>
5084#include <stdarg.h>
5085#include <string.h>
5086#include <float.h>
5087
5088int
5089main ()
5090{
5091
5092 ;
5093 return 0;
5094}
5095_ACEOF
5096if ac_fn_c_try_compile "$LINENO"; then :
5097 ac_cv_header_stdc=yes
5098else
5099 ac_cv_header_stdc=no
5100fi
5101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5102
5103if test $ac_cv_header_stdc = yes; then
5104 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h. */
5107#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005108
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005109_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005113else
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005116rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117
Matthias Kloseb9621712010-04-24 17:59:49 +00005118fi
5119
5120if test $ac_cv_header_stdc = yes; then
5121 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123/* end confdefs.h. */
5124#include <stdlib.h>
5125
5126_ACEOF
5127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5128 $EGREP "free" >/dev/null 2>&1; then :
5129
5130else
5131 ac_cv_header_stdc=no
5132fi
5133rm -f conftest*
5134
5135fi
5136
5137if test $ac_cv_header_stdc = yes; then
5138 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5139 if test "$cross_compiling" = yes; then :
5140 :
5141else
5142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5143/* end confdefs.h. */
5144#include <ctype.h>
5145#include <stdlib.h>
5146#if ((' ' & 0x0FF) == 0x020)
5147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5149#else
5150# define ISLOWER(c) \
5151 (('a' <= (c) && (c) <= 'i') \
5152 || ('j' <= (c) && (c) <= 'r') \
5153 || ('s' <= (c) && (c) <= 'z'))
5154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5155#endif
5156
5157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5158int
5159main ()
5160{
5161 int i;
5162 for (i = 0; i < 256; i++)
5163 if (XOR (islower (i), ISLOWER (i))
5164 || toupper (i) != TOUPPER (i))
5165 return 2;
5166 return 0;
5167}
5168_ACEOF
5169if ac_fn_c_try_run "$LINENO"; then :
5170
5171else
5172 ac_cv_header_stdc=no
5173fi
5174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5175 conftest.$ac_objext conftest.beam conftest.$ac_ext
5176fi
5177
5178fi
5179fi
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5181$as_echo "$ac_cv_header_stdc" >&6; }
5182if test $ac_cv_header_stdc = yes; then
5183
5184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5185
5186fi
5187
5188# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5190 inttypes.h stdint.h unistd.h
5191do :
5192 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5193ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5194"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005195if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005196 cat >>confdefs.h <<_ACEOF
5197#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5198_ACEOF
5199
5200fi
5201
5202done
5203
5204
5205
5206 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005207if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 MINIX=yes
5209else
5210 MINIX=
5211fi
5212
5213
5214 if test "$MINIX" = yes; then
5215
5216$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5217
5218
5219$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5220
5221
5222$as_echo "#define _MINIX 1" >>confdefs.h
5223
5224 fi
5225
5226
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5228$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005229if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005230 $as_echo_n "(cached) " >&6
5231else
5232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5233/* end confdefs.h. */
5234
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005235# define __EXTENSIONS__ 1
5236 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005237int
5238main ()
5239{
5240
5241 ;
5242 return 0;
5243}
5244_ACEOF
5245if ac_fn_c_try_compile "$LINENO"; then :
5246 ac_cv_safe_to_define___extensions__=yes
5247else
5248 ac_cv_safe_to_define___extensions__=no
5249fi
5250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5251fi
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5253$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5254 test $ac_cv_safe_to_define___extensions__ = yes &&
5255 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5256
5257 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5258
5259 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5260
5261 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5262
5263 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5264
5265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267# Check for unsupported systems
5268case $ac_sys_system/$ac_sys_release in
5269atheos*|Linux*/1*)
5270 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5271 echo See README for details.
5272 exit 1;;
5273esac
5274
5275
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5277$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005280if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 withval=$with_suffix;
5282 case $withval in
5283 no) EXEEXT=;;
5284 yes) EXEEXT=.exe;;
5285 *) EXEEXT=$withval;;
5286 esac
5287fi
5288
Matthias Kloseb9621712010-04-24 17:59:49 +00005289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5290$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291
5292# Test whether we're running on a non-case-sensitive system, in which
5293# case we give a warning if no ext is given
5294
Matthias Kloseb9621712010-04-24 17:59:49 +00005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5296$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297if test ! -d CaseSensitiveTestDir; then
5298mkdir CaseSensitiveTestDir
5299fi
5300
5301if test -d casesensitivetestdir
5302then
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5304$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 BUILDEXEEXT=.exe
5306else
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 BUILDEXEEXT=$EXEEXT
5310fi
5311rmdir CaseSensitiveTestDir
5312
5313case $MACHDEP in
5314bsdos*)
5315 case $CC in
5316 gcc) CC="$CC -D_HAVE_BSDI";;
5317 esac;;
5318esac
5319
5320case $ac_sys_system in
5321hp*|HP*)
5322 case $CC in
5323 cc|*/cc) CC="$CC -Ae";;
5324 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325esac
5326
5327
5328
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5330$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331if test -z "$LIBRARY"
5332then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005333 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5336$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
5338# LDLIBRARY is the name of the library to link against (as opposed to the
5339# name of the library into which to insert object files). BLDLIBRARY is also
5340# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5341# is blank as the main program is not linked directly against LDLIBRARY.
5342# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5343# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5344# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5345# DLLLIBRARY is the shared (i.e., DLL) library.
5346#
5347# RUNSHARED is used to run shared python without installed libraries
5348#
5349# INSTSONAME is the name of the shared library that will be use to install
5350# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005351#
5352# LDVERSION is the shared library version number, normally the Python version
5353# with the ABI build flags appended.
5354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356
5357
5358
5359
5360
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362LDLIBRARY="$LIBRARY"
5363BLDLIBRARY='$(LDLIBRARY)'
5364INSTSONAME='$(LDLIBRARY)'
5365DLLLIBRARY=''
5366LDLIBRARYDIR=''
5367RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005368LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# LINKCC is the command that links the python executable -- default is $(CC).
5371# If CXX is set, and if it is needed to link a main function that was
5372# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5373# python might then depend on the C++ runtime
5374# This is altered for AIX in order to build the export list before
5375# linking.
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5378$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379if test -z "$LINKCC"
5380then
5381 LINKCC='$(PURIFY) $(MAINCC)'
5382 case $ac_sys_system in
5383 AIX*)
5384 exp_extra="\"\""
5385 if test $ac_sys_release -ge 5 -o \
5386 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5387 exp_extra="."
5388 fi
5389 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390 QNX*)
5391 # qcc must be used because the other compilers do not
5392 # support -N.
5393 LINKCC=qcc;;
5394 esac
5395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5397$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398
5399# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5400# make sure we default having it set to "no": this is used by
5401# distutils.unixccompiler to know if it should add --enable-new-dtags
5402# to linker command lines, and failing to detect GNU ld simply results
5403# in the same bahaviour as before.
5404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5406$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407ac_prog=ld
5408if test "$GCC" = yes; then
5409 ac_prog=`$CC -print-prog-name=ld`
5410fi
5411case `"$ac_prog" -V 2>&1 < /dev/null` in
5412 *GNU*)
5413 GNULD=yes;;
5414 *)
5415 GNULD=no;;
5416esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5418$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5421$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005422if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005423 $as_echo_n "(cached) " >&6
5424else
5425 ac_cv_c_inline=no
5426for ac_kw in inline __inline__ __inline; do
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429#ifndef __cplusplus
5430typedef int foo_t;
5431static $ac_kw foo_t static_foo () {return 0; }
5432$ac_kw foo_t foo () {return 0; }
5433#endif
5434
5435_ACEOF
5436if ac_fn_c_try_compile "$LINENO"; then :
5437 ac_cv_c_inline=$ac_kw
5438fi
5439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5440 test "$ac_cv_c_inline" != no && break
5441done
5442
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5445$as_echo "$ac_cv_c_inline" >&6; }
5446
5447case $ac_cv_c_inline in
5448 inline | yes) ;;
5449 *)
5450 case $ac_cv_c_inline in
5451 no) ac_val=;;
5452 *) ac_val=$ac_cv_c_inline;;
5453 esac
5454 cat >>confdefs.h <<_ACEOF
5455#ifndef __cplusplus
5456#define inline $ac_val
5457#endif
5458_ACEOF
5459 ;;
5460esac
5461
5462if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005463
5464$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005465
5466
5467fi
5468
5469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5471$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005473if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474 enableval=$enable_shared;
5475fi
5476
5477
5478if test -z "$enable_shared"
5479then
5480 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005481 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 enable_shared="yes";;
5483 *)
5484 enable_shared="no";;
5485 esac
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5488$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
Matthias Kloseb9621712010-04-24 17:59:49 +00005490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5491$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005493if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005494 enableval=$enable_profiling;
5495fi
5496
5497if test "x$enable_profiling" = xyes; then
5498 ac_save_cc="$CC"
5499 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501/* end confdefs.h. */
5502int main() { return 0; }
5503_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005504if ac_fn_c_try_link "$LINENO"; then :
5505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005507 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005509rm -f core conftest.err conftest.$ac_objext \
5510 conftest$ac_exeext conftest.$ac_ext
5511 CC="$ac_save_cc"
5512else
5513 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5516$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
doko@ubuntu.comba015832012-06-30 16:52:05 +02005518if test "x$enable_profiling" = xyes; then
5519 BASECFLAGS="-pg $BASECFLAGS"
5520 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521fi
5522
Matthias Kloseb9621712010-04-24 17:59:49 +00005523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5524$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525
5526# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5527# library that we build, but we do not want to link against it (we
5528# will find it with a -framework option). For this reason there is an
5529# extra variable BLDLIBRARY against which Python and the extension
5530# modules are linked, BLDLIBRARY. This is normally the same as
5531# LDLIBRARY, but empty for MacOSX framework builds.
5532if test "$enable_framework"
5533then
5534 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5535 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5536 BLDLIBRARY=''
5537else
5538 BLDLIBRARY='$(LDLIBRARY)'
5539fi
5540
5541# Other platforms follow
5542if test $enable_shared = "yes"; then
5543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
5546 case $ac_sys_system in
5547 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005548 LDLIBRARY='libpython$(LDVERSION).dll.a'
5549 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550 ;;
5551 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005552 LDLIBRARY='libpython$(LDVERSION).so'
5553 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5555 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005556 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005557 then
5558 PY3LIBRARY=libpython3.so
5559 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005561 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005562 LDLIBRARY='libpython$(LDVERSION).so'
5563 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5565 case $ac_sys_system in
5566 FreeBSD*)
5567 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5568 ;;
5569 esac
5570 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005571 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005572 then
5573 PY3LIBRARY=libpython3.so
5574 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 ;;
5576 hp*|HP*)
5577 case `uname -m` in
5578 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580 ;;
5581 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005582 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 ;;
5584 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005585 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5587 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005589 LDLIBRARY='libpython$(LDVERSION).dylib'
5590 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5592 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005593 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005594 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005595 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5596 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598 esac
5599else # shared is disabled
5600 case $ac_sys_system in
5601 CYGWIN*)
5602 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005603 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 ;;
5605 esac
5606fi
5607
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005608if test "$cross_compiling" = yes; then
5609 RUNSHARED=
5610fi
5611
Matthias Kloseb9621712010-04-24 17:59:49 +00005612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5613$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
5615if test -n "$ac_tool_prefix"; then
5616 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5617set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005620if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622else
5623 if test -n "$RANLIB"; then
5624 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5625else
5626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629 IFS=$as_save_IFS
5630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005632 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 break 2
5636 fi
5637done
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639IFS=$as_save_IFS
5640
5641fi
5642fi
5643RANLIB=$ac_cv_prog_RANLIB
5644if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5646$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647else
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650fi
5651
5652
5653fi
5654if test -z "$ac_cv_prog_RANLIB"; then
5655 ac_ct_RANLIB=$RANLIB
5656 # Extract the first word of "ranlib", so it can be a program name with args.
5657set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005660if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662else
5663 if test -n "$ac_ct_RANLIB"; then
5664 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5665else
5666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669 IFS=$as_save_IFS
5670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005672 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 break 2
5676 fi
5677done
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679IFS=$as_save_IFS
5680
5681fi
5682fi
5683ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5684if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5686$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
5691
5692 if test "x$ac_ct_RANLIB" = x; then
5693 RANLIB=":"
5694 else
5695 case $cross_compiling:$ac_tool_warned in
5696yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699ac_tool_warned=yes ;;
5700esac
5701 RANLIB=$ac_ct_RANLIB
5702 fi
5703else
5704 RANLIB="$ac_cv_prog_RANLIB"
5705fi
5706
5707
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005708if test -n "$ac_tool_prefix"; then
5709 for ac_prog in ar aal
5710 do
5711 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5712set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5714$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005715if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717else
5718 if test -n "$AR"; then
5719 ac_cv_prog_AR="$AR" # Let the user override the test.
5720else
5721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5722for as_dir in $PATH
5723do
5724 IFS=$as_save_IFS
5725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005727 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5728 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730 break 2
5731 fi
5732done
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734IFS=$as_save_IFS
5735
5736fi
5737fi
5738AR=$ac_cv_prog_AR
5739if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5741$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
5746
5747
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005748 test -n "$AR" && break
5749 done
5750fi
5751if test -z "$AR"; then
5752 ac_ct_AR=$AR
5753 for ac_prog in ar aal
5754do
5755 # Extract the first word of "$ac_prog", so it can be a program name with args.
5756set dummy $ac_prog; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_prog_ac_ct_AR+:} false; then :
5760 $as_echo_n "(cached) " >&6
5761else
5762 if test -n "$ac_ct_AR"; then
5763 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5764else
5765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768 IFS=$as_save_IFS
5769 test -z "$as_dir" && as_dir=.
5770 for ac_exec_ext in '' $ac_executable_extensions; do
5771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5772 ac_cv_prog_ac_ct_AR="$ac_prog"
5773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5774 break 2
5775 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005777 done
5778IFS=$as_save_IFS
5779
5780fi
5781fi
5782ac_ct_AR=$ac_cv_prog_ac_ct_AR
5783if test -n "$ac_ct_AR"; then
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5785$as_echo "$ac_ct_AR" >&6; }
5786else
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792 test -n "$ac_ct_AR" && break
5793done
5794
5795 if test "x$ac_ct_AR" = x; then
5796 AR="ar"
5797 else
5798 case $cross_compiling:$ac_tool_warned in
5799yes:)
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5802ac_tool_warned=yes ;;
5803esac
5804 AR=$ac_ct_AR
5805 fi
5806fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807
5808
5809# tweak ARFLAGS only if the user didn't set it on the command line
5810
5811if test -z "$ARFLAGS"
5812then
5813 ARFLAGS="rc"
5814fi
5815
doko@ubuntu.com58844492012-06-30 18:25:32 +02005816if test -n "$ac_tool_prefix"; then
5817 for ac_prog in readelf
5818 do
5819 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_prog_READELF+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825else
5826 if test -n "$READELF"; then
5827 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5828else
5829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832 IFS=$as_save_IFS
5833 test -z "$as_dir" && as_dir=.
5834 for ac_exec_ext in '' $ac_executable_extensions; do
5835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5836 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5838 break 2
5839 fi
5840done
5841 done
5842IFS=$as_save_IFS
5843
5844fi
5845fi
5846READELF=$ac_cv_prog_READELF
5847if test -n "$READELF"; then
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5849$as_echo "$READELF" >&6; }
5850else
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852$as_echo "no" >&6; }
5853fi
5854
5855
5856 test -n "$READELF" && break
5857 done
5858fi
5859if test -z "$READELF"; then
5860 ac_ct_READELF=$READELF
5861 for ac_prog in readelf
5862do
5863 # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5868 $as_echo_n "(cached) " >&6
5869else
5870 if test -n "$ac_ct_READELF"; then
5871 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5872else
5873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
5878 for ac_exec_ext in '' $ac_executable_extensions; do
5879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5880 ac_cv_prog_ac_ct_READELF="$ac_prog"
5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882 break 2
5883 fi
5884done
5885 done
5886IFS=$as_save_IFS
5887
5888fi
5889fi
5890ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5891if test -n "$ac_ct_READELF"; then
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5893$as_echo "$ac_ct_READELF" >&6; }
5894else
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897fi
5898
5899
5900 test -n "$ac_ct_READELF" && break
5901done
5902
5903 if test "x$ac_ct_READELF" = x; then
5904 READELF=":"
5905 else
5906 case $cross_compiling:$ac_tool_warned in
5907yes:)
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5910ac_tool_warned=yes ;;
5911esac
5912 READELF=$ac_ct_READELF
5913 fi
5914fi
5915
5916if test "$cross_compiling" = yes; then
5917 case "$READELF" in
5918 readelf|:)
5919 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5920 ;;
5921 esac
5922fi
5923
5924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005926DISABLE_ASDLGEN=""
5927# Extract the first word of "python", so it can be a program name with args.
5928set dummy python; ac_word=$2
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005931if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005932 $as_echo_n "(cached) " >&6
5933else
5934 if test -n "$HAS_PYTHON"; then
5935 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5936else
5937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938for as_dir in $PATH
5939do
5940 IFS=$as_save_IFS
5941 test -z "$as_dir" && as_dir=.
5942 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005943 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 -05005944 ac_cv_prog_HAS_PYTHON="found"
5945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946 break 2
5947 fi
5948done
5949 done
5950IFS=$as_save_IFS
5951
5952 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5953fi
5954fi
5955HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5956if test -n "$HAS_PYTHON"; then
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5958$as_echo "$HAS_PYTHON" >&6; }
5959else
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961$as_echo "no" >&6; }
5962fi
5963
5964
5965if test $HAS_HG != found -o $HAS_PYTHON != found
5966then
5967 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5968fi
5969
5970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971case $MACHDEP in
5972bsdos*|hp*|HP*)
5973 # install -d does not work on BSDI or HP-UX
5974 if test -z "$INSTALL"
5975 then
5976 INSTALL="${srcdir}/install-sh -c"
5977 fi
5978esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979# Find a good install program. We prefer a C program (faster),
5980# so one script is as good as another. But avoid the broken or
5981# incompatible versions:
5982# SysV /etc/install, /usr/sbin/install
5983# SunOS /usr/etc/install
5984# IRIX /sbin/install
5985# AIX /bin/install
5986# AmigaOS /C/install, which installs bootblocks on floppy discs
5987# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5988# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5989# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5990# OS/2's system install, which has a completely different semantic
5991# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005992# Reject install programs that cannot install multiple files.
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5994$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005996if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002 IFS=$as_save_IFS
6003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 # Account for people who put trailing slashes in PATH elements.
6005case $as_dir/ in #((
6006 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 /usr/ucb/* ) ;;
6010 *)
6011 # OSF1 and SCO ODT 3.0 have their own names for install.
6012 # Don't use installbsd from OSF since it installs stuff as root
6013 # by default.
6014 for ac_prog in ginstall scoinst install; do
6015 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006016 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 +00006017 if test $ac_prog = install &&
6018 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6019 # AIX install. It has an incompatible calling convention.
6020 :
6021 elif test $ac_prog = install &&
6022 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6023 # program-specific install script used by HP pwplus--don't use.
6024 :
6025 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 rm -rf conftest.one conftest.two conftest.dir
6027 echo one > conftest.one
6028 echo two > conftest.two
6029 mkdir conftest.dir
6030 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6031 test -s conftest.one && test -s conftest.two &&
6032 test -s conftest.dir/conftest.one &&
6033 test -s conftest.dir/conftest.two
6034 then
6035 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6036 break 3
6037 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038 fi
6039 fi
6040 done
6041 done
6042 ;;
6043esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006044
6045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046IFS=$as_save_IFS
6047
Matthias Kloseb9621712010-04-24 17:59:49 +00006048rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049
6050fi
6051 if test "${ac_cv_path_install+set}" = set; then
6052 INSTALL=$ac_cv_path_install
6053 else
6054 # As a last resort, use the slow shell script. Don't cache a
6055 # value for INSTALL within a source directory, because that will
6056 # break other packages using the cache if that directory is
6057 # removed, or if the value is a relative name.
6058 INSTALL=$ac_install_sh
6059 fi
6060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6062$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063
6064# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6065# It thinks the first close brace ends the variable substitution.
6066test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6067
6068test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6069
6070test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6071
Matthias Klose93a0ef12012-03-15 18:08:34 +01006072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6073$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6074if test -z "$MKDIR_P"; then
6075 if ${ac_cv_path_mkdir+:} false; then :
6076 $as_echo_n "(cached) " >&6
6077else
6078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6080do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
6083 for ac_prog in mkdir gmkdir; do
6084 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006085 { 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 +01006086 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6087 'mkdir (GNU coreutils) '* | \
6088 'mkdir (coreutils) '* | \
6089 'mkdir (fileutils) '4.1*)
6090 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6091 break 3;;
6092 esac
6093 done
6094 done
6095 done
6096IFS=$as_save_IFS
6097
6098fi
6099
6100 test -d ./--version && rmdir ./--version
6101 if test "${ac_cv_path_mkdir+set}" = set; then
6102 MKDIR_P="$ac_cv_path_mkdir -p"
6103 else
6104 # As a last resort, use the slow shell script. Don't cache a
6105 # value for MKDIR_P within a source directory, because that will
6106 # break other packages using the cache if that directory is
6107 # removed, or if the value is a relative name.
6108 MKDIR_P="$ac_install_sh -d"
6109 fi
6110fi
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6112$as_echo "$MKDIR_P" >&6; }
6113
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114
6115# Not every filesystem supports hard links
6116
6117if test -z "$LN" ; then
6118 case $ac_sys_system in
6119 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120 *) LN=ln;;
6121 esac
6122fi
6123
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006124# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006125
6126ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006127
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6130$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006131
6132# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006133if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134 withval=$with_pydebug;
6135if test "$withval" != no
6136then
6137
Matthias Kloseb9621712010-04-24 17:59:49 +00006138$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6141$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006143 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006144else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6145$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146fi
6147else
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6149$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150fi
6151
6152
6153# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6154# merged with this chunk of code?
6155
6156# Optimizer/debugger flags
6157# ------------------------
6158# (The following bit of code is complicated enough - please keep things
6159# indented properly. Just pretend you're editing Python code. ;-)
6160
6161# There are two parallel sets of case statements below, one that checks to
6162# see if OPT was set and one that does BASECFLAGS setting based upon
6163# compiler and platform. BASECFLAGS tweaks need to be made even if the
6164# user set OPT.
6165
6166# tweak OPT based on compiler and platform, only if the user didn't set
6167# it on the command line
6168
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006169if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170then
6171 case $GCC in
6172 yes)
6173 if test "$CC" != 'g++' ; then
6174 STRICT_PROTO="-Wstrict-prototypes"
6175 fi
6176 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6177 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6178 WRAP="-fwrapv"
6179 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006180
6181 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006182 case $CC in
6183 *clang*) WRAP="-fwrapv"
6184 ;;
6185 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006186
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 case $ac_cv_prog_cc_g in
6188 yes)
6189 if test "$Py_DEBUG" = 'true' ; then
6190 # Optimization messes up debuggers, so turn it off for
6191 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006192 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193 else
6194 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6195 fi
6196 ;;
6197 *)
6198 OPT="-O3 -Wall $STRICT_PROTO"
6199 ;;
6200 esac
6201 case $ac_sys_system in
6202 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6203 ;;
6204 esac
6205 ;;
6206
6207 *)
6208 OPT="-O"
6209 ;;
6210 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211fi
6212
6213
6214
6215# The -arch flags for universal builds on OSX
6216UNIVERSAL_ARCH_FLAGS=
6217
6218
6219# tweak BASECFLAGS based on compiler and platform
6220case $GCC in
6221yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006222 # Python doesn't violate C99 aliasing rules, but older versions of
6223 # GCC produce warnings for legal Python code. Enable
6224 # -fno-strict-aliasing on versions of GCC that support but produce
6225 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6227$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 ac_save_cc="$CC"
6229 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006230 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006231 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006233else
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006236
Matthias Kloseb159a552010-04-25 21:00:44 +00006237
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006238int
6239main ()
6240{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006241
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006242 ;
6243 return 0;
6244}
Matthias Kloseb159a552010-04-25 21:00:44 +00006245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 CC="$ac_save_cc -fstrict-aliasing"
6250 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006252/* end confdefs.h. */
6253
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006254 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006255int
6256main ()
6257{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006258double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006259 ;
6260 return 0;
6261}
Matthias Kloseb159a552010-04-25 21:00:44 +00006262
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006264if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006265
6266 ac_cv_no_strict_aliasing=no
6267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268else
Matthias Kloseb159a552010-04-25 21:00:44 +00006269
6270 ac_cv_no_strict_aliasing=yes
6271
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006272fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006274
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275else
Matthias Kloseb159a552010-04-25 21:00:44 +00006276
6277 ac_cv_no_strict_aliasing=no
6278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006281fi
6282
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6286$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006287 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 then
6289 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6290 fi
6291
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6293$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6294 ac_save_cc="$CC"
6295 CC="$CC -Wunused-result -Werror"
6296 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006297 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006298 $as_echo_n "(cached) " >&6
6299else
6300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6301/* end confdefs.h. */
6302
6303
6304int
6305main ()
6306{
6307
6308 ;
6309 return 0;
6310}
6311
6312_ACEOF
6313if ac_fn_c_try_compile "$LINENO"; then :
6314
6315 ac_cv_disable_unused_result_warning=yes
6316
6317else
6318
6319 ac_cv_disable_unused_result_warning=no
6320
6321fi
6322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6323fi
6324
6325 CFLAGS="$save_CFLAGS"
6326 CC="$ac_save_cc"
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6328$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6329
6330 if test $ac_cv_disable_unused_result_warning = yes
6331 then
6332 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6333 fi
6334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6336 # support. Without this, treatment of subnormals doesn't follow
6337 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006338 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 alpha*)
6340 BASECFLAGS="$BASECFLAGS -mieee"
6341 ;;
6342 esac
6343
6344 case $ac_sys_system in
6345 SCO_SV*)
6346 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6347 ;;
6348 # is there any other compiler on Darwin besides gcc?
6349 Darwin*)
6350 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6351 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006352 if test "${CC}" = gcc
6353 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6355$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006356 case "${UNIVERSALSDK}" in
6357 */MacOSX10.4u.sdk)
6358 # Build using 10.4 SDK, force usage of gcc when the
6359 # compiler is gcc, otherwise the user will get very
6360 # confusing error messages when building on OSX 10.6
6361 CC=gcc-4.0
6362 CPP=cpp-4.0
6363 ;;
6364 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6366$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006367 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
6369
6370 if test "${enable_universalsdk}"; then
6371 UNIVERSAL_ARCH_FLAGS=""
6372 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6373 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6374 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006375 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6377 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006378 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006379 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380
6381 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6382 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006383 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006384 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006386 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6387 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006388 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006389 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006390
6391 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6392 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006393 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006394 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006397 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 +00006398
6399 fi
6400
6401
Ronald Oussoren666028b2010-04-18 19:07:43 +00006402 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6403 if test "${UNIVERSALSDK}" != "/"
6404 then
6405 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6406 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006407 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 fi
6409 fi
6410
6411 # Calculate the right deployment target for this build.
6412 #
6413 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006414 if test ${cur_target} '>' 10.2 && \
6415 test ${cur_target} '<' 10.6
6416 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006418 if test ${enable_universalsdk}; then
6419 if test "${UNIVERSAL_ARCHS}" = "all"; then
6420 # Ensure that the default platform for a
6421 # 4-way universal build is OSX 10.5,
6422 # that's the first OS release where
6423 # 4-way builds make sense.
6424 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006425
6426 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6427 cur_target='10.5'
6428
6429 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6430 cur_target='10.5'
6431
6432 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6433 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006434 fi
6435 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006436 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006437 # On Intel macs default to a deployment
6438 # target of 10.4, that's the first OSX
6439 # release with Intel support.
6440 cur_target="10.4"
6441 fi
6442 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 fi
6444 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6445
6446 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6447 # environment with a value that is the same as what we'll use
6448 # in the Makefile to ensure that we'll get the same compiler
6449 # environment during configure and build time.
6450 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6451 export MACOSX_DEPLOYMENT_TARGET
6452 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6453
6454 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 esac
6456 ;;
6457
6458*)
6459 case $ac_sys_system in
6460 OpenUNIX*|UnixWare*)
6461 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6462 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463 SCO_SV*)
6464 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6465 ;;
6466 esac
6467 ;;
6468esac
6469
6470if test "$Py_DEBUG" = 'true'; then
6471 :
6472else
6473 OPT="-DNDEBUG $OPT"
6474fi
6475
6476if test "$ac_arch_flags"
6477then
6478 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6479fi
6480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481# Check whether GCC supports PyArg_ParseTuple format
6482if test "$GCC" = "yes"
6483then
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6485$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486 save_CFLAGS=$CFLAGS
6487 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006489/* end confdefs.h. */
6490
6491 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492int
6493main ()
6494{
6495
6496 ;
6497 return 0;
6498}
Matthias Kloseb159a552010-04-25 21:00:44 +00006499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006501if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502
Matthias Kloseb159a552010-04-25 21:00:44 +00006503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505
Matthias Kloseb159a552010-04-25 21:00:44 +00006506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006508
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509else
Matthias Kloseb159a552010-04-25 21:00:44 +00006510
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513
6514fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6516 CFLAGS=$save_CFLAGS
6517fi
6518
6519# On some compilers, pthreads are available without further options
6520# (e.g. MacOS X). On some of these systems, the compiler will not
6521# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6522# So we have to see first whether pthreads are available without
6523# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6525$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006526if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006527 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528else
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530 ac_cv_pthread_is_default=no
6531else
Matthias Kloseb9621712010-04-24 17:59:49 +00006532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533/* end confdefs.h. */
6534
6535#include <pthread.h>
6536
6537void* routine(void* p){return NULL;}
6538
6539int main(){
6540 pthread_t p;
6541 if(pthread_create(&p,NULL,routine,NULL)!=0)
6542 return 1;
6543 (void)pthread_detach(p);
6544 return 0;
6545}
6546
6547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006548if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
6550 ac_cv_pthread_is_default=yes
6551 ac_cv_kthread=no
6552 ac_cv_pthread=no
6553
6554else
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559fi
6560
6561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562fi
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6565$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566
6567
6568if test $ac_cv_pthread_is_default = yes
6569then
6570 ac_cv_kpthread=no
6571else
6572# -Kpthread, if available, provides the right #defines
6573# and linker options to make pthread_create available
6574# Some compilers won't report that they do not support -Kpthread,
6575# so we need to run a program to see whether it really made the
6576# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6578$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006579if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006581else
6582 ac_save_cc="$CC"
6583CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006584if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006585 ac_cv_kpthread=no
6586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588/* end confdefs.h. */
6589
6590#include <pthread.h>
6591
6592void* routine(void* p){return NULL;}
6593
6594int main(){
6595 pthread_t p;
6596 if(pthread_create(&p,NULL,routine,NULL)!=0)
6597 return 1;
6598 (void)pthread_detach(p);
6599 return 0;
6600}
6601
6602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006603if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604 ac_cv_kpthread=yes
6605else
Matthias Kloseb9621712010-04-24 17:59:49 +00006606 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610fi
6611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612CC="$ac_save_cc"
6613fi
6614
Matthias Kloseb9621712010-04-24 17:59:49 +00006615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6616$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617fi
6618
6619if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6620then
6621# -Kthread, if available, provides the right #defines
6622# and linker options to make pthread_create available
6623# Some compilers won't report that they do not support -Kthread,
6624# so we need to run a program to see whether it really made the
6625# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6627$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006628if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630else
6631 ac_save_cc="$CC"
6632CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006633if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634 ac_cv_kthread=no
6635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637/* end confdefs.h. */
6638
6639#include <pthread.h>
6640
6641void* routine(void* p){return NULL;}
6642
6643int main(){
6644 pthread_t p;
6645 if(pthread_create(&p,NULL,routine,NULL)!=0)
6646 return 1;
6647 (void)pthread_detach(p);
6648 return 0;
6649}
6650
6651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006652if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653 ac_cv_kthread=yes
6654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659fi
6660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661CC="$ac_save_cc"
6662fi
6663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6665$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666fi
6667
6668if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6669then
6670# -pthread, if available, provides the right #defines
6671# and linker options to make pthread_create available
6672# Some compilers won't report that they do not support -pthread,
6673# so we need to run a program to see whether it really made the
6674# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6676$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006677if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006679else
6680 ac_save_cc="$CC"
6681CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006682if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 ac_cv_pthread=no
6684else
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686/* end confdefs.h. */
6687
6688#include <pthread.h>
6689
6690void* routine(void* p){return NULL;}
6691
6692int main(){
6693 pthread_t p;
6694 if(pthread_create(&p,NULL,routine,NULL)!=0)
6695 return 1;
6696 (void)pthread_detach(p);
6697 return 0;
6698}
6699
6700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006701if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702 ac_cv_pthread=yes
6703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
6709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710CC="$ac_save_cc"
6711fi
6712
Matthias Kloseb9621712010-04-24 17:59:49 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6714$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715fi
6716
6717# If we have set a CC compiler flag for thread support then
6718# check if it works for CXX, too.
6719ac_cv_cxx_thread=no
6720if test ! -z "$CXX"
6721then
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6723$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724ac_save_cxx="$CXX"
6725
6726if test "$ac_cv_kpthread" = "yes"
6727then
6728 CXX="$CXX -Kpthread"
6729 ac_cv_cxx_thread=yes
6730elif test "$ac_cv_kthread" = "yes"
6731then
6732 CXX="$CXX -Kthread"
6733 ac_cv_cxx_thread=yes
6734elif test "$ac_cv_pthread" = "yes"
6735then
6736 CXX="$CXX -pthread"
6737 ac_cv_cxx_thread=yes
6738fi
6739
6740if test $ac_cv_cxx_thread = yes
6741then
6742 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6743 $CXX -c conftest.$ac_ext 2>&5
6744 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6745 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6746 then
6747 ac_cv_cxx_thread=yes
6748 else
6749 ac_cv_cxx_thread=no
6750 fi
6751 rm -fr conftest*
6752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6754$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755fi
6756CXX="$ac_save_cxx"
6757
6758
6759# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6761$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006762if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766/* end confdefs.h. */
6767#include <stdlib.h>
6768#include <stdarg.h>
6769#include <string.h>
6770#include <float.h>
6771
6772int
6773main ()
6774{
6775
6776 ;
6777 return 0;
6778}
6779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006780if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 ac_cv_header_stdc=yes
6782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6786
6787if test $ac_cv_header_stdc = yes; then
6788 # SunOS 4.x string.h does not declare mem*, 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 <string.h>
6792
6793_ACEOF
6794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 $EGREP "memchr" >/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 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807/* end confdefs.h. */
6808#include <stdlib.h>
6809
6810_ACEOF
6811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 $EGREP "free" >/dev/null 2>&1; then :
6813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814else
6815 ac_cv_header_stdc=no
6816fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006817rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818
6819fi
6820
6821if test $ac_cv_header_stdc = yes; then
6822 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824 :
6825else
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827/* end confdefs.h. */
6828#include <ctype.h>
6829#include <stdlib.h>
6830#if ((' ' & 0x0FF) == 0x020)
6831# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6832# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6833#else
6834# define ISLOWER(c) \
6835 (('a' <= (c) && (c) <= 'i') \
6836 || ('j' <= (c) && (c) <= 'r') \
6837 || ('s' <= (c) && (c) <= 'z'))
6838# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6839#endif
6840
6841#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6842int
6843main ()
6844{
6845 int i;
6846 for (i = 0; i < 256; i++)
6847 if (XOR (islower (i), ISLOWER (i))
6848 || toupper (i) != TOUPPER (i))
6849 return 2;
6850 return 0;
6851}
6852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_run "$LINENO"; then :
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
6863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6865$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866if test $ac_cv_header_stdc = yes; then
6867
Matthias Kloseb9621712010-04-24 17:59:49 +00006868$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869
6870fi
6871
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006872ac_save_cppflags="$CPPFLAGS"
6873CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006874for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006875fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006876ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006877sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006878unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006879poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006880sys/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 +01006881sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006882sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006883sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006884sys/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 -07006885libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006886bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006887do :
6888 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6889ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006890if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006891 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006892#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006893_ACEOF
6894
6895fi
6896
Guido van Rossum627b2d71993-12-24 10:39:16 +00006897done
6898
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006899CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006900ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006901for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6904$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006905if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910#include <sys/types.h>
6911#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913int
6914main ()
6915{
6916if ((DIR *) 0)
6917return 0;
6918 ;
6919 return 0;
6920}
6921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006922if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006924else
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006929eval ac_res=\$$as_ac_Header
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6931$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006932if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006934#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
6936
6937ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006939
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940done
6941# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6942if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6944$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006945if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006947else
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952/* Override any GCC internal prototype to avoid an error.
6953 Use char because int might match the return type of a GCC
6954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006955#ifdef __cplusplus
6956extern "C"
6957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006958char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006959int
6960main ()
6961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 ;
6964 return 0;
6965}
6966_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967for ac_lib in '' dir; do
6968 if test -z "$ac_lib"; then
6969 ac_res="none required"
6970 else
6971 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977rm -f core conftest.err conftest.$ac_objext \
6978 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006979 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982done
Victor Stinnere0be4232011-10-25 13:06:09 +02006983if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006985else
6986 ac_cv_search_opendir=no
6987fi
6988rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006989LIBS=$ac_func_search_save_LIBS
6990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6992$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006994if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006998
Michael W. Hudson54241132001-12-07 15:38:26 +00006999else
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7001$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007002if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007004else
7005 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009/* Override any GCC internal prototype to avoid an error.
7010 Use char because int might match the return type of a GCC
7011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007012#ifdef __cplusplus
7013extern "C"
7014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007015char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ;
7021 return 0;
7022}
7023_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024for ac_lib in '' x; do
7025 if test -z "$ac_lib"; then
7026 ac_res="none required"
7027 else
7028 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034rm -f core conftest.err conftest.$ac_objext \
7035 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007036 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039done
Victor Stinnere0be4232011-10-25 13:06:09 +02007040if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042else
7043 ac_cv_search_opendir=no
7044fi
7045rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007046LIBS=$ac_func_search_save_LIBS
7047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7049$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007050ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007051if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054fi
7055
7056fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7059$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007060if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007062else
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007064/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007065#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007066int
7067main ()
7068{
7069return makedev(0, 0);
7070 ;
7071 return 0;
7072}
7073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007075 ac_cv_header_sys_types_h_makedev=yes
7076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079rm -f core conftest.err conftest.$ac_objext \
7080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007081
7082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7084$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007085
7086if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007087ac_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 +02007088if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007089
Matthias Kloseb9621712010-04-24 17:59:49 +00007090$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007091
7092fi
7093
7094
7095
7096 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 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 +02007098if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007099
Matthias Kloseb9621712010-04-24 17:59:49 +00007100$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007101
7102fi
7103
7104
7105 fi
7106fi
7107
Michael W. Hudson54241132001-12-07 15:38:26 +00007108
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007109# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7110for ac_header in net/if.h
7111do :
7112 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7113#ifdef STDC_HEADERS
7114# include <stdlib.h>
7115# include <stddef.h>
7116#else
7117# ifdef HAVE_STDLIB_H
7118# include <stdlib.h>
7119# endif
7120#endif
7121#ifdef HAVE_SYS_SOCKET_H
7122# include <sys/socket.h>
7123#endif
7124
7125"
Victor Stinnere0be4232011-10-25 13:06:09 +02007126if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007127 cat >>confdefs.h <<_ACEOF
7128#define HAVE_NET_IF_H 1
7129_ACEOF
7130
7131fi
7132
7133done
7134
7135
7136
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007137# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007138for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007139do :
7140 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007141#ifdef HAVE_CURSES_H
7142#include <curses.h>
7143#endif
7144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145"
Victor Stinnere0be4232011-10-25 13:06:09 +02007146if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007147 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007148#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007149_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007150
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007151fi
7152
7153done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007154
7155
Martin v. Löwis11017b12006-01-14 18:12:57 +00007156# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007157for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007158do :
7159 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 +00007160#ifdef HAVE_ASM_TYPES_H
7161#include <asm/types.h>
7162#endif
7163#ifdef HAVE_SYS_SOCKET_H
7164#include <sys/socket.h>
7165#endif
7166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167"
Victor Stinnere0be4232011-10-25 13:06:09 +02007168if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007170#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007171_ACEOF
7172
7173fi
7174
7175done
7176
7177
Charles-François Natali47413c12011-10-06 19:47:44 +02007178# On Linux, can.h and can/raw.h require sys/socket.h
7179for ac_header in linux/can.h linux/can/raw.h
7180do :
7181 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7182ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7183#ifdef HAVE_SYS_SOCKET_H
7184#include <sys/socket.h>
7185#endif
7186
7187"
7188if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7189 cat >>confdefs.h <<_ACEOF
7190#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7191_ACEOF
7192
7193fi
7194
7195done
7196
7197
Guido van Rossum627b2d71993-12-24 10:39:16 +00007198# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007199was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7201$as_echo_n "checking for clock_t in time.h... " >&6; }
7202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007204#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007205
7206_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007209 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007210else
Martin v. Löwis11437992002-04-12 09:54:03 +00007211
7212
Matthias Kloseb9621712010-04-24 17:59:49 +00007213$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007214
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007215
Guido van Rossum627b2d71993-12-24 10:39:16 +00007216fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007217rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007218
Matthias Kloseb9621712010-04-24 17:59:49 +00007219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7220$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007221
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7223$as_echo_n "checking for makedev... " >&6; }
7224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
Jesus Cea740f53a2010-04-28 11:35:30 +00007227#if defined(MAJOR_IN_MKDEV)
7228#include <sys/mkdev.h>
7229#elif defined(MAJOR_IN_SYSMACROS)
7230#include <sys/sysmacros.h>
7231#else
7232#include <sys/types.h>
7233#endif
7234
Neal Norwitz11690112002-07-30 01:08:28 +00007235int
7236main ()
7237{
Jesus Cea740f53a2010-04-28 11:35:30 +00007238
7239 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007240 ;
7241 return 0;
7242}
Matthias Kloseb159a552010-04-25 21:00:44 +00007243
Neal Norwitz11690112002-07-30 01:08:28 +00007244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007245if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007246 ac_cv_has_makedev=yes
7247else
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007250rm -f core conftest.err conftest.$ac_objext \
7251 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7253$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007254if test "$ac_cv_has_makedev" = "yes"; then
7255
Matthias Kloseb9621712010-04-24 17:59:49 +00007256$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007257
7258fi
7259
Martin v. Löwis399a6892002-10-04 10:22:02 +00007260# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7261# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7262# defined, but the compiler does not support pragma redefine_extname,
7263# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7264# structures (such as rlimit64) without declaring them. As a
7265# work-around, disable LFS on such configurations
7266
7267use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7269$as_echo_n "checking Solaris LFS bug... " >&6; }
7270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007271/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007272
7273#define _LARGEFILE_SOURCE 1
7274#define _FILE_OFFSET_BITS 64
7275#include <sys/resource.h>
7276
Martin v. Löwis399a6892002-10-04 10:22:02 +00007277int
7278main ()
7279{
7280struct rlimit foo;
7281 ;
7282 return 0;
7283}
7284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007286 sol_lfs_bug=no
7287else
Matthias Kloseb9621712010-04-24 17:59:49 +00007288 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7292$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007293if test "$sol_lfs_bug" = "yes"; then
7294 use_lfs=no
7295fi
7296
7297if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007298# Two defines needed to enable largefile support on various platforms
7299# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007300case $ac_sys_system/$ac_sys_release in
7301AIX*)
7302
7303$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7304
7305 ;;
7306esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007309
7310
Matthias Kloseb9621712010-04-24 17:59:49 +00007311$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007312
Martin v. Löwis399a6892002-10-04 10:22:02 +00007313fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007314
Guido van Rossum84e7b241996-08-19 21:59:00 +00007315# Add some code to confdefs.h so that the test for off_t works on SCO
7316cat >> confdefs.h <<\EOF
7317#if defined(SCO_DS)
7318#undef _OFF_T
7319#endif
7320EOF
7321
Guido van Rossumef2255b2000-03-10 22:30:29 +00007322# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007323ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007324if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007326else
Martin v. Löwis11437992002-04-12 09:54:03 +00007327
7328cat >>confdefs.h <<_ACEOF
7329#define mode_t int
7330_ACEOF
7331
7332fi
7333
Matthias Kloseb9621712010-04-24 17:59:49 +00007334ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007335if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007336
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007337else
Martin v. Löwis11437992002-04-12 09:54:03 +00007338
7339cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007340#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007341_ACEOF
7342
7343fi
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007346if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007348else
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
7350cat >>confdefs.h <<_ACEOF
7351#define pid_t int
7352_ACEOF
7353
7354fi
7355
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007358#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007362if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007363
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007364else
Martin v. Löwis11437992002-04-12 09:54:03 +00007365
7366cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007367#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007368_ACEOF
7369
7370fi
7371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7373$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007379#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007380
7381_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007384 ac_cv_type_uid_t=yes
7385else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007386 ac_cv_type_uid_t=no
7387fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007388rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7392$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007393if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399
7400fi
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7403case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007404 no|yes) ;; #(
7405 *)
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007408
7409
7410cat >>confdefs.h <<_ACEOF
7411#define uint32_t $ac_cv_c_uint32_t
7412_ACEOF
7413;;
7414 esac
7415
Matthias Kloseb9621712010-04-24 17:59:49 +00007416ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7417case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007418 no|yes) ;; #(
7419 *)
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007422
7423
7424cat >>confdefs.h <<_ACEOF
7425#define uint64_t $ac_cv_c_uint64_t
7426_ACEOF
7427;;
7428 esac
7429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7431case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007432 no|yes) ;; #(
7433 *)
7434
7435cat >>confdefs.h <<_ACEOF
7436#define int32_t $ac_cv_c_int32_t
7437_ACEOF
7438;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007439esac
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7442case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007443 no|yes) ;; #(
7444 *)
7445
7446cat >>confdefs.h <<_ACEOF
7447#define int64_t $ac_cv_c_int64_t
7448_ACEOF
7449;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007450esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451
Matthias Kloseb9621712010-04-24 17:59:49 +00007452ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007453if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456
7457fi
7458
Stefan Krah1919b7e2012-03-21 18:25:23 +01007459ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7460if test "x$ac_cv_type___uint128_t" = xyes; then :
7461
7462$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7463
7464fi
7465
Jack Jansendd19cf82001-12-06 22:36:17 +00007466
Michael W. Hudson54241132001-12-07 15:38:26 +00007467# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007468# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007469# The cast to long int works around a bug in the HP C Compiler
7470# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7471# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7472# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7474$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007475if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 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 +00007479
Martin v. Löwis11437992002-04-12 09:54:03 +00007480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 if test "$ac_cv_type_int" = yes; then
7482 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7483$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007484as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007485See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007486 else
7487 ac_cv_sizeof_int=0
7488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7493$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007494
7495
7496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007498#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007499_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007500
7501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007502# The cast to long int works around a bug in the HP C Compiler
7503# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7504# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7505# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7507$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007508if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 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 +00007512
Martin v. Löwis11437992002-04-12 09:54:03 +00007513else
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 if test "$ac_cv_type_long" = yes; then
7515 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7516$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007517as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007518See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519 else
7520 ac_cv_sizeof_long=0
7521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007523
Martin v. Löwis11437992002-04-12 09:54:03 +00007524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7526$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007527
7528
7529
Martin v. Löwis11437992002-04-12 09:54:03 +00007530cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007531#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007532_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007533
7534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007535# The cast to long int works around a bug in the HP C Compiler
7536# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7537# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7538# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7540$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007541if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 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 +00007545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546else
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 if test "$ac_cv_type_void_p" = yes; then
7548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007550as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007551See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007552 else
7553 ac_cv_sizeof_void_p=0
7554 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556
Martin v. Löwis11437992002-04-12 09:54:03 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7559$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560
7561
7562
Martin v. Löwis11437992002-04-12 09:54:03 +00007563cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007564#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007565_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007566
7567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007568# The cast to long int works around a bug in the HP C Compiler
7569# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7570# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7571# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7573$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007574if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 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 +00007578
Martin v. Löwis11437992002-04-12 09:54:03 +00007579else
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 if test "$ac_cv_type_short" = yes; then
7581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007583as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007584See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585 else
7586 ac_cv_sizeof_short=0
7587 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7592$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593
7594
7595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007597#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007598_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007599
7600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601# The cast to long int works around a bug in the HP C Compiler
7602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7604# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7606$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 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 +00007611
Martin v. Löwis11437992002-04-12 09:54:03 +00007612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 if test "$ac_cv_type_float" = yes; then
7614 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007616as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007617See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 else
7619 ac_cv_sizeof_float=0
7620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7625$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626
7627
7628
Martin v. Löwis11437992002-04-12 09:54:03 +00007629cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007630#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007631_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007632
7633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634# The cast to long int works around a bug in the HP C Compiler
7635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7637# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7639$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007640if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007642else
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 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 +00007644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 if test "$ac_cv_type_double" = yes; then
7647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007649as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007650See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 else
7652 ac_cv_sizeof_double=0
7653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7658$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659
7660
7661
Martin v. Löwis11437992002-04-12 09:54:03 +00007662cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007663#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007664_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007665
7666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667# The cast to long int works around a bug in the HP C Compiler
7668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7670# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7672$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007673if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007675else
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 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 +00007677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 if test "$ac_cv_type_fpos_t" = yes; then
7680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007682as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007683See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 else
7685 ac_cv_sizeof_fpos_t=0
7686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7691$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692
7693
7694
Martin v. Löwis11437992002-04-12 09:54:03 +00007695cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007696#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007697_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007698
Michael W. Hudson54241132001-12-07 15:38:26 +00007699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700# The cast to long int works around a bug in the HP C Compiler
7701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7703# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7705$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007706if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007708else
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 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 +00007710
Martin v. Löwis18e16552006-02-15 17:27:45 +00007711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 if test "$ac_cv_type_size_t" = yes; then
7713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007715as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007716See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 else
7718 ac_cv_sizeof_size_t=0
7719 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007721
Martin v. Löwis18e16552006-02-15 17:27:45 +00007722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7724$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725
7726
7727
Martin v. Löwis18e16552006-02-15 17:27:45 +00007728cat >>confdefs.h <<_ACEOF
7729#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7730_ACEOF
7731
7732
Christian Heimes400adb02008-02-01 08:12:03 +00007733# The cast to long int works around a bug in the HP C Compiler
7734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7738$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007739if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 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 +00007743
Christian Heimes400adb02008-02-01 08:12:03 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 if test "$ac_cv_type_pid_t" = yes; then
7746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007748as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007749See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007750 else
7751 ac_cv_sizeof_pid_t=0
7752 fi
7753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754
Christian Heimes400adb02008-02-01 08:12:03 +00007755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7757$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007758
7759
7760
7761cat >>confdefs.h <<_ACEOF
7762#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7763_ACEOF
7764
7765
Michael W. Hudson54241132001-12-07 15:38:26 +00007766
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7768$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007769have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773int
7774main ()
7775{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007776long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ;
7778 return 0;
7779}
7780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
7783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007785
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007786 have_long_long=yes
7787
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7791$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007792if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793# The cast to long int works around a bug in the HP C Compiler
7794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7796# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7798$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007799if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007801else
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 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 +00007803
Martin v. Löwis11437992002-04-12 09:54:03 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 if test "$ac_cv_type_long_long" = yes; then
7806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007808as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 else
7811 ac_cv_sizeof_long_long=0
7812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7817$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818
7819
7820
Martin v. Löwis11437992002-04-12 09:54:03 +00007821cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007822#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007823_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007824
Michael W. Hudson54241132001-12-07 15:38:26 +00007825
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007826fi
7827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7829$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007830have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007832/* end confdefs.h. */
7833
7834int
7835main ()
7836{
7837long double x; x = (long double)0;
7838 ;
7839 return 0;
7840}
7841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007842if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007843
7844
Matthias Kloseb9621712010-04-24 17:59:49 +00007845$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007846
7847 have_long_double=yes
7848
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007849fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7852$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007853if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007854# The cast to long int works around a bug in the HP C Compiler
7855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7857# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7859$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 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 +00007864
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 if test "$ac_cv_type_long_double" = yes; then
7867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007869as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007870See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007871 else
7872 ac_cv_sizeof_long_double=0
7873 fi
7874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7878$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007879
7880
7881
7882cat >>confdefs.h <<_ACEOF
7883#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7884_ACEOF
7885
7886
7887fi
7888
7889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7891$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007892have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007894/* end confdefs.h. */
7895
7896int
7897main ()
7898{
7899_Bool x; x = (_Bool)0;
7900 ;
7901 return 0;
7902}
7903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007904if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007905
7906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007908
7909 have_c99_bool=yes
7910
Thomas Woutersb2137042007-02-01 18:02:27 +00007911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7914$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007915if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916# The cast to long int works around a bug in the HP C Compiler
7917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7921$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007922if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 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 +00007926
Thomas Woutersb2137042007-02-01 18:02:27 +00007927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 if test "$ac_cv_type__Bool" = yes; then
7929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007931as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007932See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933 else
7934 ac_cv_sizeof__Bool=0
7935 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937
Thomas Woutersb2137042007-02-01 18:02:27 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7940$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941
7942
7943
Thomas Woutersb2137042007-02-01 18:02:27 +00007944cat >>confdefs.h <<_ACEOF
7945#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7946_ACEOF
7947
7948
7949fi
7950
Matthias Kloseb9621712010-04-24 17:59:49 +00007951ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007952 #include <stdint.h>
7953 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007954 #ifdef HAVE_INTTYPES_H
7955 #include <inttypes.h>
7956 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007957"
Victor Stinnere0be4232011-10-25 13:06:09 +02007958if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007959
7960cat >>confdefs.h <<_ACEOF
7961#define HAVE_UINTPTR_T 1
7962_ACEOF
7963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964# The cast to long int works around a bug in the HP C Compiler
7965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7969$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007970if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007972else
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 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 +00007974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 if test "$ac_cv_type_uintptr_t" = yes; then
7977 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007979as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007980See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 else
7982 ac_cv_sizeof_uintptr_t=0
7983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985
Martin v. Löwis11437992002-04-12 09:54:03 +00007986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7988$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989
7990
7991
Martin v. Löwis11437992002-04-12 09:54:03 +00007992cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007993#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007994_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007995
Michael W. Hudson54241132001-12-07 15:38:26 +00007996
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007997fi
7998
Thomas Wouters89f507f2006-12-13 04:49:30 +00007999
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008000# The cast to long int works around a bug in the HP C Compiler
8001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8003# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8005$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008010#ifdef HAVE_SYS_TYPES_H
8011#include <sys/types.h>
8012#endif
8013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008015
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 if test "$ac_cv_type_off_t" = yes; then
8018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008020as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008021See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008022 else
8023 ac_cv_sizeof_off_t=0
8024 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8029$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008031
8032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008034#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008035_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008036
Michael W. Hudson54241132001-12-07 15:38:26 +00008037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8040$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008041if test "$have_long_long" = yes
8042then
8043if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008044 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8049$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008053fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008057fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008059# The cast to long int works around a bug in the HP C Compiler
8060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8062# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8064$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008067else
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008069#ifdef HAVE_SYS_TYPES_H
8070#include <sys/types.h>
8071#endif
8072#ifdef HAVE_TIME_H
8073#include <time.h>
8074#endif
8075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008077
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 if test "$ac_cv_type_time_t" = yes; then
8080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008082as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008083See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084 else
8085 ac_cv_sizeof_time_t=0
8086 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8091$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093
8094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008096#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008097_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008098
Michael W. Hudson54241132001-12-07 15:38:26 +00008099
8100
Trent Mick635f6fb2000-08-23 21:33:05 +00008101# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008102ac_save_cc="$CC"
8103if test "$ac_cv_kpthread" = "yes"
8104then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008105elif test "$ac_cv_kthread" = "yes"
8106then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008107elif test "$ac_cv_pthread" = "yes"
8108then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008109fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8112$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008113have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008116
8117 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008118int
8119main ()
8120{
Guido van Rossum12580492000-09-24 16:47:19 +00008121pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 ;
8123 return 0;
8124}
Matthias Kloseb159a552010-04-25 21:00:44 +00008125
Martin v. Löwis11437992002-04-12 09:54:03 +00008126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008128 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8132$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008133if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8136# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8137# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8139$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008140if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008142else
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144#ifdef HAVE_PTHREAD_H
8145#include <pthread.h>
8146#endif
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008150else
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 if test "$ac_cv_type_pthread_t" = yes; then
8152 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008154as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008155See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008156 else
8157 ac_cv_sizeof_pthread_t=0
8158 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160
Trent Mick635f6fb2000-08-23 21:33:05 +00008161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8163$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008165
8166
Martin v. Löwis11437992002-04-12 09:54:03 +00008167cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008168#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008169_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008171
Trent Mick635f6fb2000-08-23 21:33:05 +00008172fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008173CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008176case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008177 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008178 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8179 ;;
8180 Darwin/*)
8181 OTHER_LIBTOOL_OPT=""
8182 ;;
8183esac
8184
8185
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008186ARCH_RUN_32BIT=""
8187
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008188case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008189 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008190 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8191 if test "${enable_universalsdk}"; then
8192 :
8193 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008194 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008195 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008196 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008197 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008198 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008199 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008200 if test ${gcc_version} '<' 4.0
8201 then
8202 LIBTOOL_CRUFT="-lcc_dynamic"
8203 else
8204 LIBTOOL_CRUFT=""
8205 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008207 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008208else
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008210/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008211
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008212 #include <unistd.h>
8213 int main(int argc, char*argv[])
8214 {
8215 if (sizeof(long) == 4) {
8216 return 0;
8217 } else {
8218 return 1;
8219 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008220 }
8221
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008223if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008224 ac_osx_32bit=yes
8225else
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008230fi
8231
8232
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008233 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008234 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008235 i386)
8236 MACOSX_DEFAULT_ARCH="i386"
8237 ;;
8238 ppc)
8239 MACOSX_DEFAULT_ARCH="ppc"
8240 ;;
8241 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008242 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008243 ;;
8244 esac
8245 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008246 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008247 i386)
8248 MACOSX_DEFAULT_ARCH="x86_64"
8249 ;;
8250 ppc)
8251 MACOSX_DEFAULT_ARCH="ppc64"
8252 ;;
8253 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008255 ;;
8256 esac
8257
8258 #ARCH_RUN_32BIT="true"
8259 fi
8260
8261 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008262 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008263 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008264esac
8265
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8267$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008268if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008269then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008270 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008272 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8277$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008278 if test $enable_shared = "yes"
8279 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008280 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 +00008281 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008282else
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008285fi
8286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8288$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008289case $ac_sys_system/$ac_sys_release in
8290 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8295$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008296 ;;
8297 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008300 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008301esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008302
Guido van Rossum0a516c91994-09-12 10:58:40 +00008303# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008304
Michael W. Hudson54241132001-12-07 15:38:26 +00008305
8306
8307
8308
Benjamin Peterson99f03762010-04-11 22:15:28 +00008309
Thomas Wouters477c8d52006-05-27 19:21:47 +00008310
Georg Brandlb1441c72009-01-03 22:33:39 +00008311
Thomas Wouters477c8d52006-05-27 19:21:47 +00008312cat >>confdefs.h <<_ACEOF
8313#define SHLIB_EXT "$SO"
8314_ACEOF
8315
Guido van Rossum0a516c91994-09-12 10:58:40 +00008316# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008317# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008318# (Shared libraries in this instance are shared modules to be loaded into
8319# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8321$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008322if test -z "$LDSHARED"
8323then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008325 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008326 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008327 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008328 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008329 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008330 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008331 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008332 if test "$GCC" = "yes" ; then
8333 LDSHARED='$(CC) -shared'
8334 LDCXXSHARED='$(CXX) -shared'
8335 else
8336 LDSHARED='$(CC) -G'
8337 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008338 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008339 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008340 if test "$GCC" = "yes" ; then
8341 LDSHARED='$(CC) -shared'
8342 LDCXXSHARED='$(CXX) -shared'
8343 else
8344 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008345 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008346 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008347 LDSHARED='$(CC) -bundle'
8348 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008349 if test "$enable_framework" ; then
8350 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008351 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8352 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008353 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008354 else
8355 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008356 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008357 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008358 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008359 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008360 LDSHARED='$(CC) -bundle'
8361 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008362 if test "$enable_framework" ; then
8363 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008364 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8365 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008366 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008367 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008368 # No framework, use the Python app as bundle-loader
8369 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008370 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008371 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008372 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008373 Darwin/*)
8374 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8375 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008376
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008377 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008378 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008379 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008380 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008381 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008382 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8383 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008384 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008385 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008386 LDSHARED='$(CC) -bundle'
8387 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008388 if test "$enable_framework" ; then
8389 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008390 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8391 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008392 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008393 else
8394 # No framework, use the Python app as bundle-loader
8395 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8396 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008397 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008398 fi
8399 fi
8400 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008401 Linux*|GNU*|QNX*)
8402 LDSHARED='$(CC) -shared'
8403 LDCXXSHARED='$(CXX) -shared';;
8404 BSD/OS*/4*)
8405 LDSHARED="gcc -shared"
8406 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008407 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008408 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008409 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008410 LDSHARED='$(CC) -shared'
8411 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008412 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008413 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008414 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008415 OpenBSD*)
8416 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8417 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008418 LDSHARED='$(CC) -shared $(CCSHARED)'
8419 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008420 else
8421 case `uname -r` in
8422 [01].* | 2.[0-7] | 2.[0-7].*)
8423 LDSHARED="ld -Bshareable ${LDFLAGS}"
8424 ;;
8425 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008426 LDSHARED='$(CC) -shared $(CCSHARED)'
8427 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008428 ;;
8429 esac
8430 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008432 LDSHARED='$(CC) -shared'
8433 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008434 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008435 if test "$GCC" = "yes" ; then
8436 LDSHARED='$(CC) -shared'
8437 LDCXXSHARED='$(CXX) -shared'
8438 else
8439 LDSHARED='$(CC) -G'
8440 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008441 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008442 SCO_SV*)
8443 LDSHARED='$(CC) -Wl,-G,-Bexport'
8444 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8445 CYGWIN*)
8446 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8447 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008448 *) LDSHARED="ld";;
8449 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8452$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008453LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008454BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008456# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8458$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008459if test -z "$CCSHARED"
8460then
Guido van Rossum07397971997-04-29 21:49:50 +00008461 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008462 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008463 then CCSHARED="-fPIC";
8464 elif test `uname -p` = sparc;
8465 then CCSHARED="-xcode=pic32";
8466 else CCSHARED="-Kpic";
8467 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008468 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008469 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008470 else CCSHARED="+z";
8471 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008472 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008473 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008474 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008475 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008476 if test "$GCC" = "yes"
8477 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008478 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008479 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008480 SCO_SV*)
8481 if test "$GCC" = "yes"
8482 then CCSHARED="-fPIC"
8483 else CCSHARED="-Kpic -belf"
8484 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008485 IRIX*/6*) case $CC in
8486 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008487 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008488 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8492$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008493# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008494# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8496$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008497if test -z "$LINKFORSHARED"
8498then
Guido van Rossum07397971997-04-29 21:49:50 +00008499 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008500 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008501 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008502 LINKFORSHARED="-Wl,-E -Wl,+s";;
8503# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008504 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008505 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008506 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008508 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008509 if test "$enable_framework"
8510 then
Jack Jansenda49e192005-01-07 13:08:22 +00008511 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008512 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008513 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008514 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008515 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008516 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008517 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008518 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8519 then
8520 LINKFORSHARED="-Wl,--export-dynamic"
8521 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008522 SunOS/5*) case $CC in
8523 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008524 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008525 then
8526 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008527 fi;;
8528 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008529 CYGWIN*)
8530 if test $enable_shared = "no"
8531 then
8532 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8533 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008534 QNX*)
8535 # -Wl,-E causes the symbols to be added to the dynamic
8536 # symbol table so that they can be found when a module
8537 # is loaded. -N 2048K causes the stack size to be set
8538 # to 2048 kilobytes so that the stack doesn't overflow
8539 # when running test_compile.py.
8540 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008541 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8544$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008545
Michael W. Hudson54241132001-12-07 15:38:26 +00008546
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008547
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8549$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008550if test ! "$LIBRARY" = "$LDLIBRARY"
8551then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008552 case $ac_sys_system in
8553 CYGWIN*)
8554 # Cygwin needs CCSHARED when building extension DLLs
8555 # but not when building the interpreter DLL.
8556 CFLAGSFORSHARED='';;
8557 *)
8558 CFLAGSFORSHARED='$(CCSHARED)'
8559 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8562$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008563
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008564# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8565# library (with --enable-shared).
8566# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008567# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8568# if it is not required, since it creates a dependency of the shared library
8569# to LIBS. This, in turn, means that applications linking the shared libpython
8570# don't need to link LIBS explicitly. The default should be only changed
8571# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008572
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8574$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008575case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008576 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008577 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008578esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8580$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008581
8582
Guido van Rossum627b2d71993-12-24 10:39:16 +00008583# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8585$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008586if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008587 $as_echo_n "(cached) " >&6
8588else
8589 ac_check_lib_save_LIBS=$LIBS
8590LIBS="-lsendfile $LIBS"
8591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592/* end confdefs.h. */
8593
8594/* Override any GCC internal prototype to avoid an error.
8595 Use char because int might match the return type of a GCC
8596 builtin and then its argument prototype would still apply. */
8597#ifdef __cplusplus
8598extern "C"
8599#endif
8600char sendfile ();
8601int
8602main ()
8603{
8604return sendfile ();
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609if ac_fn_c_try_link "$LINENO"; then :
8610 ac_cv_lib_sendfile_sendfile=yes
8611else
8612 ac_cv_lib_sendfile_sendfile=no
8613fi
8614rm -f core conftest.err conftest.$ac_objext \
8615 conftest$ac_exeext conftest.$ac_ext
8616LIBS=$ac_check_lib_save_LIBS
8617fi
8618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8619$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008620if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008621 cat >>confdefs.h <<_ACEOF
8622#define HAVE_LIBSENDFILE 1
8623_ACEOF
8624
8625 LIBS="-lsendfile $LIBS"
8626
8627fi
8628
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8630$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008631if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008633else
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008635LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639/* Override any GCC internal prototype to avoid an error.
8640 Use char because int might match the return type of a GCC
8641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642#ifdef __cplusplus
8643extern "C"
8644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008645char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008646int
8647main ()
8648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ;
8651 return 0;
8652}
8653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659rm -f core conftest.err conftest.$ac_objext \
8660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8664$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 cat >>confdefs.h <<_ACEOF
8667#define HAVE_LIBDL 1
8668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008670 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008672fi
8673 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8675$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008676if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008678else
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008680LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684/* Override any GCC internal prototype to avoid an error.
8685 Use char because int might match the return type of a GCC
8686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008687#ifdef __cplusplus
8688extern "C"
8689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008690char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008691int
8692main ()
8693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 ;
8696 return 0;
8697}
8698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008699if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008704rm -f core conftest.err conftest.$ac_objext \
8705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008706LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8709$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 cat >>confdefs.h <<_ACEOF
8712#define HAVE_LIBDLD 1
8713_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008714
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008715 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008717fi
8718 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008719
Georg Brandlb1441c72009-01-03 22:33:39 +00008720# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008721if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8723$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008724if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008726else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008727 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746for ac_lib in '' pthread rt posix4; do
8747 if test -z "$ac_lib"; then
8748 ac_res="none required"
8749 else
8750 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756rm -f core conftest.err conftest.$ac_objext \
8757 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008758 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761done
Victor Stinnere0be4232011-10-25 13:06:09 +02008762if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764else
8765 ac_cv_search_sem_init=no
8766fi
8767rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008768LIBS=$ac_func_search_save_LIBS
8769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8771$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008773if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008775
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008776fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008777 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008778 # posix4 on Solaris 2.6
8779 # pthread (first!) on Linux
8780fi
8781
Martin v. Löwis19d17342003-06-14 21:03:05 +00008782# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8784$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008785if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008787else
8788 ac_check_lib_save_LIBS=$LIBS
8789LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008791/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793/* Override any GCC internal prototype to avoid an error.
8794 Use char because int might match the return type of a GCC
8795 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008796#ifdef __cplusplus
8797extern "C"
8798#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008799char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008800int
8801main ()
8802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008804 ;
8805 return 0;
8806}
8807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008809 ac_cv_lib_intl_textdomain=yes
8810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813rm -f core conftest.err conftest.$ac_objext \
8814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008815LIBS=$ac_check_lib_save_LIBS
8816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8818$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008819if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008820
Matthias Kloseb9621712010-04-24 17:59:49 +00008821$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008822
Brett Cannonc6d936e2009-06-07 20:09:53 +00008823 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008824fi
8825
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008826
8827# checks for system dependent C++ extensions support
8828case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8830$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
Georg Brandl59e87bd2011-02-15 19:48:59 +00008834 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008835int
8836main ()
8837{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008838loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ;
8840 return 0;
8841}
Matthias Kloseb159a552010-04-25 21:00:44 +00008842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008844if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008845
Matthias Kloseb159a552010-04-25 21:00:44 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008848
Matthias Kloseb159a552010-04-25 21:00:44 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008850$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008851
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008852else
Matthias Kloseb159a552010-04-25 21:00:44 +00008853
8854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008855$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008856
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858rm -f core conftest.err conftest.$ac_objext \
8859 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008860 *) ;;
8861esac
8862
Guido van Rossum70c7f481998-03-26 18:44:10 +00008863# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8865$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008868else
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008870LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874/* Override any GCC internal prototype to avoid an error.
8875 Use char because int might match the return type of a GCC
8876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008877#ifdef __cplusplus
8878extern "C"
8879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008880char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008881int
8882main ()
8883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ;
8886 return 0;
8887}
8888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894rm -f core conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8899$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008901 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008902fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008903 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8905$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008906if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008908else
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008910LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914/* Override any GCC internal prototype to avoid an error.
8915 Use char because int might match the return type of a GCC
8916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917#ifdef __cplusplus
8918extern "C"
8919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008920char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008921int
8922main ()
8923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ;
8926 return 0;
8927}
8928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934rm -f core conftest.err conftest.$ac_objext \
8935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8939$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008940if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008941 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008942fi
8943 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8946$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008949if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8952$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008953LIBS="$withval $LIBS"
8954
8955else
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958fi
8959
Guido van Rossum7f43da71994-08-01 12:15:30 +00008960
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008961if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008962 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8963set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008966if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008968else
8969 case $PKG_CONFIG in
8970 [\\/]* | ?:[\\/]*)
8971 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8972 ;;
8973 *)
8974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977 IFS=$as_save_IFS
8978 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008980 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 +00008981 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008983 break 2
8984 fi
8985done
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008987IFS=$as_save_IFS
8988
8989 ;;
8990esac
8991fi
8992PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8993if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8995$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008996else
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008999fi
9000
9001
9002fi
9003if test -z "$ac_cv_path_PKG_CONFIG"; then
9004 ac_pt_PKG_CONFIG=$PKG_CONFIG
9005 # Extract the first word of "pkg-config", so it can be a program name with args.
9006set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9008$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009011else
9012 case $ac_pt_PKG_CONFIG in
9013 [\\/]* | ?:[\\/]*)
9014 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9015 ;;
9016 *)
9017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9018for as_dir in $PATH
9019do
9020 IFS=$as_save_IFS
9021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02009023 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 +00009024 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009026 break 2
9027 fi
9028done
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009030IFS=$as_save_IFS
9031
9032 ;;
9033esac
9034fi
9035ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9036if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9038$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009039else
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9041$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009042fi
9043
9044 if test "x$ac_pt_PKG_CONFIG" = x; then
9045 PKG_CONFIG=""
9046 else
9047 case $cross_compiling:$ac_tool_warned in
9048yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009051ac_tool_warned=yes ;;
9052esac
9053 PKG_CONFIG=$ac_pt_PKG_CONFIG
9054 fi
9055else
9056 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9057fi
9058
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009059
9060# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9062$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009063
9064# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009065if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009066 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009067else
9068 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009069fi
9070
9071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9073$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009074
9075# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9077$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009078
9079# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009080if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009081 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009082else
9083 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009084fi
9085
9086
9087if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009088 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9089else
9090 LIBFFI_INCLUDEDIR=""
9091fi
9092
9093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9095$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009096
Stefan Krah60187b52012-03-23 19:06:27 +01009097# Check for use of the system libmpdec library
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9099$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9100
9101# Check whether --with-system_libmpdec was given.
9102if test "${with_system_libmpdec+set}" = set; then :
9103 withval=$with_system_libmpdec;
9104else
9105 with_system_libmpdec="no"
9106fi
9107
9108
9109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9110$as_echo "$with_system_libmpdec" >&6; }
9111
Benjamin Peterson076ed002010-10-31 17:11:02 +00009112# Check for support for loadable sqlite extensions
9113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9114$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9115# Check whether --enable-loadable-sqlite-extensions was given.
9116if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9117 enableval=$enable_loadable_sqlite_extensions;
9118else
9119 enable_loadable_sqlite_extensions="no"
9120fi
9121
9122
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9124$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9125
Matthias Klose55708cc2009-04-30 08:06:49 +00009126# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9128$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009129
9130# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009131if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009132 withval=$with_dbmliborder;
9133if test x$with_dbmliborder = xyes
9134then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009135as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009136else
9137 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9138 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9139 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009140 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009141 fi
9142 done
9143fi
9144fi
9145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9147$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009148
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009149# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009150
9151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9153$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009156if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157 withval=$with_signal_module;
9158fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009159
9160
9161if test -z "$with_signal_module"
9162then with_signal_module="yes"
9163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9165$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009166
9167if test "${with_signal_module}" = "yes"; then
9168 USE_SIGNAL_MODULE=""
9169 SIGNAL_OBJS=""
9170else
9171 USE_SIGNAL_MODULE="#"
9172 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9173fi
9174
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009175# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009176
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009177USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179
Martin v. Löwis11437992002-04-12 09:54:03 +00009180
9181# Templates for things AC_DEFINEd more than once.
9182# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009183
9184
Martin v. Löwis11437992002-04-12 09:54:03 +00009185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9187$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 withval=$with_threads;
9192fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009193
9194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009195# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009198if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199 withval=$with_thread; with_threads=$with_thread
9200fi
9201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009202
9203if test -z "$with_threads"
9204then with_threads="yes"
9205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9207$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009208
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009209
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009210if test "$with_threads" = "no"
9211then
9212 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009213elif test "$ac_cv_pthread_is_default" = yes
9214then
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009217 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009219
9220 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009222elif test "$ac_cv_kpthread" = "yes"
9223then
9224 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009225 if test "$ac_cv_cxx_thread" = "yes"; then
9226 CXX="$CXX -Kpthread"
9227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009230 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009231 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009232elif test "$ac_cv_kthread" = "yes"
9233then
9234 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009235 if test "$ac_cv_cxx_thread" = "yes"; then
9236 CXX="$CXX -Kthread"
9237 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009239
9240 posix_threads=yes
9241 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009242elif test "$ac_cv_pthread" = "yes"
9243then
9244 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009245 if test "$ac_cv_cxx_thread" = "yes"; then
9246 CXX="$CXX -pthread"
9247 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009249
9250 posix_threads=yes
9251 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009252else
9253 if test ! -z "$with_threads" -a -d "$with_threads"
9254 then LDFLAGS="$LDFLAGS -L$with_threads"
9255 fi
9256 if test ! -z "$withval" -a -d "$withval"
9257 then LDFLAGS="$LDFLAGS -L$withval"
9258 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009259
9260 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009261 # define _POSIX_THREADS in unistd.h. Some apparently don't
9262 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9264$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009267
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009268#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009269#ifdef _POSIX_THREADS
9270yes
9271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009272
9273_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009276 unistd_defines_pthreads=yes
9277else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009278 unistd_defines_pthreads=no
9279fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009280rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9283$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009286
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009287 # Just looking for pthread_create in libpthread is not enough:
9288 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9289 # So we really have to include pthread.h, and then link.
9290 _libs=$LIBS
9291 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9293$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009295/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009296#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009297
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009298void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009299int
9300main ()
9301{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009302
9303pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ;
9305 return 0;
9306}
9307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9311$as_echo "yes" >&6; }
9312 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009313
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009314 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009315 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009316else
Martin v. Löwis11437992002-04-12 09:54:03 +00009317
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009318 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009320if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009322
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009323 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009324 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009325else
Guido van Rossumad678af1998-10-02 14:42:15 +00009326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9328$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009329if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009331else
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009333LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337/* Override any GCC internal prototype to avoid an error.
9338 Use char because int might match the return type of a GCC
9339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009340#ifdef __cplusplus
9341extern "C"
9342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009343char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ;
9349 return 0;
9350}
9351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009354else
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009357rm -f core conftest.err conftest.$ac_objext \
9358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009359LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9362$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009363if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009367 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009368 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009369else
Greg Steinadf63d62000-07-05 10:38:09 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9372$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009373if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009375else
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009377LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381/* Override any GCC internal prototype to avoid an error.
9382 Use char because int might match the return type of a GCC
9383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009384#ifdef __cplusplus
9385extern "C"
9386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009387char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009388int
9389main ()
9390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 ;
9393 return 0;
9394}
9395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009398else
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009401rm -f core conftest.err conftest.$ac_objext \
9402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009403LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9406$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009407if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009410 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009411 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009412 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009413else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9416$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009419else
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009421LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428#ifdef __cplusplus
9429extern "C"
9430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009431char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009432int
9433main ()
9434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ;
9437 return 0;
9438}
9439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009442else
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009445rm -f core conftest.err conftest.$ac_objext \
9446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009447LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9450$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009451if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009453
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009454 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009455 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009456 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009457else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9460$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009463else
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009465LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469/* Override any GCC internal prototype to avoid an error.
9470 Use char because int might match the return type of a GCC
9471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#ifdef __cplusplus
9473extern "C"
9474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476int
9477main ()
9478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ;
9481 return 0;
9482}
9483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009486else
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489rm -f core conftest.err conftest.$ac_objext \
9490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009491LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9494$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009497
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009498 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009499 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009500 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009501else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009502
Martin v. Löwis130fb172001-07-19 11:00:41 +00009503 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009504fi
9505
Guido van Rossum627b2d71993-12-24 10:39:16 +00009506
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009507fi
9508
Guido van Rossum0be3e491997-05-22 20:33:33 +00009509fi
9510
Guido van Rossum49545951997-12-02 19:28:29 +00009511fi
9512
Guido van Rossumb93a8621998-05-07 13:27:32 +00009513fi
9514
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9520$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009521if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009523else
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009525LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529/* Override any GCC internal prototype to avoid an error.
9530 Use char because int might match the return type of a GCC
9531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532#ifdef __cplusplus
9533extern "C"
9534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009535char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009536int
9537main ()
9538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ;
9541 return 0;
9542}
9543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009546else
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009549rm -f core conftest.err conftest.$ac_objext \
9550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009551LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9554$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009557
Martin v. Löwis130fb172001-07-19 11:00:41 +00009558 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009559 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009560 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009561fi
9562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009563
Neal Norwitza978ab02002-11-02 16:58:05 +00009564 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9566$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009567if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009569else
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009571LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575/* Override any GCC internal prototype to avoid an error.
9576 Use char because int might match the return type of a GCC
9577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009578#ifdef __cplusplus
9579extern "C"
9580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009581char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ;
9587 return 0;
9588}
9589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009592else
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595rm -f core conftest.err conftest.$ac_objext \
9596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009597LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9600$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009601if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009603
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009604 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009605 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009606 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607fi
9608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009609 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009610fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009611
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009612if test "$posix_threads" = "yes"; then
9613 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616
9617 fi
9618
9619 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9620 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009621 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009622$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624 ;;
9625 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627
9628 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009629 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009631
9632 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009633 esac
9634
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9636$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009637 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009639else
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009641 ac_cv_pthread_system_supported=no
9642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009645#include <pthread.h>
9646 void *foo(void *parm) {
9647 return NULL;
9648 }
9649 main() {
9650 pthread_attr_t attr;
9651 pthread_t id;
9652 if (pthread_attr_init(&attr)) exit(-1);
9653 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9654 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9655 exit(0);
9656 }
9657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009658if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659 ac_cv_pthread_system_supported=yes
9660else
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009665fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667
Guido van Rossum627b2d71993-12-24 10:39:16 +00009668fi
9669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9671$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672 if test "$ac_cv_pthread_system_supported" = "yes"; then
9673
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675
9676 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 for ac_func in pthread_sigmask
9678do :
9679 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009680if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009681 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009682#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009683_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009684 case $ac_sys_system in
9685 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686
Matthias Kloseb9621712010-04-24 17:59:49 +00009687$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009688
9689 ;;
9690 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009691fi
9692done
9693
9694fi
9695
9696
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009697# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9700$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009702if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009704 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707 ipv6=no
9708 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9710$as_echo "yes" >&6; }
9711 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009712
9713 ipv6=yes
9714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009722 ipv6=no
9723
9724else
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727 /* AF_INET6 available check */
9728#include <sys/types.h>
9729#include <sys/socket.h>
9730main()
9731{
9732 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9733 exit(1);
9734 else
9735 exit(0);
9736}
9737
Martin v. Löwis11437992002-04-12 09:54:03 +00009738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009740
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9742$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009743 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009744
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009745else
Matthias Kloseb159a552010-04-25 21:00:44 +00009746
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009749 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009754fi
9755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009757if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9759$as_echo_n "checking if RFC2553 API is available... " >&6; }
9760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009762
9763 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009764#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009765int
9766main ()
9767{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009768struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009769 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ;
9771 return 0;
9772}
Matthias Kloseb159a552010-04-25 21:00:44 +00009773
Martin v. Löwis11437992002-04-12 09:54:03 +00009774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009775if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009776
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009778$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009779 ipv6=yes
9780
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009781else
Matthias Kloseb159a552010-04-25 21:00:44 +00009782
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009784$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009785 ipv6=no
9786
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009789fi
9790
9791if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009793
9794fi
9795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796fi
9797
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009798
9799ipv6type=unknown
9800ipv6lib=none
9801ipv6trylibc=no
9802
9803if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9805$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009806 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9807 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009808 case $i in
9809 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009813#include <netinet/in.h>
9814#ifdef IPV6_INRIA_VERSION
9815yes
9816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009820 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009822rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823
9824 ;;
9825 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829#include <netinet/in.h>
9830#ifdef __KAME__
9831yes
9832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009833_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836 ipv6type=$i;
9837 ipv6lib=inet6
9838 ipv6libdir=/usr/local/v6/lib
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-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009846/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848#include <features.h>
9849#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9850yes
9851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 $EGREP "yes" >/dev/null 2>&1; 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 +00009857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009858rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859
9860 ;;
9861 linux-inet6)
9862 if test -d /usr/inet6; then
9863 ipv6type=$i
9864 ipv6lib=inet6
9865 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009866 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867 fi
9868 ;;
9869 solaris)
9870 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009871 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872 ipv6type=$i
9873 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874 fi
9875 fi
9876 ;;
9877 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009879/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009881#include <sys/param.h>
9882#ifdef _TOSHIBA_INET6
9883yes
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888 ipv6type=$i;
9889 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009890 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009892rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893
9894 ;;
9895 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899#include </usr/local/v6/include/sys/v6config.h>
9900#ifdef __V6D__
9901yes
9902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906 ipv6type=$i;
9907 ipv6lib=v6;
9908 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009909 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009911rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912
9913 ;;
9914 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918#include <sys/param.h>
9919#ifdef _ZETA_MINAMI_INET6
9920yes
9921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925 ipv6type=$i;
9926 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009927 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009930
9931 ;;
9932 esac
9933 if test "$ipv6type" != "unknown"; then
9934 break
9935 fi
9936 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9938$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939fi
9940
9941if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9942 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9943 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9944 echo "using lib$ipv6lib"
9945 else
9946 if test $ipv6trylibc = "yes"; then
9947 echo "using libc"
9948 else
9949 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9950 echo "You need to fetch lib$ipv6lib.a from appropriate"
9951 echo 'ipv6 kit and compile beforehand.'
9952 exit 1
9953 fi
9954 fi
9955fi
9956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9958$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009960/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009961
9962 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009963int
9964main ()
9965{
9966FSIORefNum fRef = 0
9967 ;
9968 return 0;
9969}
Matthias Kloseb159a552010-04-25 21:00:44 +00009970
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009973
Matthias Kloseb159a552010-04-25 21:00:44 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9978$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009979
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009980else
Matthias Kloseb159a552010-04-25 21:00:44 +00009981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009984
9985fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9987
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009988# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9990$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009993if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994 withval=$with_doc_strings;
9995fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009996
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009997
9998if test -z "$with_doc_strings"
9999then with_doc_strings="yes"
10000fi
10001if test "$with_doc_strings" != "no"
10002then
10003
Matthias Kloseb9621712010-04-24 17:59:49 +000010004$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010005
10006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10008$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010009
Antoine Pitrou042b1282010-08-13 21:15:58 +000010010# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10012$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010015if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010017if test "$withval" != no
10018then
10019
Matthias Kloseb9621712010-04-24 17:59:49 +000010020$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10023$as_echo "yes" >&6; }
10024else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010026fi
10027else
Matthias Kloseb9621712010-04-24 17:59:49 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030fi
10031
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010032
10033# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10035$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010038if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039 withval=$with_pymalloc;
10040fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010041
Neil Schemenauera35c6882001-02-27 04:45:05 +000010042
Neil Schemenauer16c22972002-03-22 15:34:49 +000010043if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010044then
10045 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010046fi
10047if test "$with_pymalloc" != "no"
10048then
Martin v. Löwis11437992002-04-12 09:54:03 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010051
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010052 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10055$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010056
Benjamin Peterson05159c42009-12-03 03:01:27 +000010057# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10059$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010060
10061# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010063 withval=$with_valgrind;
10064else
10065 with_valgrind=no
10066fi
10067
Matthias Kloseb9621712010-04-24 17:59:49 +000010068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10069$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010070if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 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 +020010072if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010075
10076else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010077 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010078
10079fi
10080
10081
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010082 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010083fi
10084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010085# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010086
Guido van Rossum98935bf2001-09-05 19:13:16 +000010087DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010088
Guido van Rossume97ee181999-12-20 21:27:22 +000010089# the dlopen() function means we might want to use dynload_shlib.o. some
10090# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010091for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010092do :
10093 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010097_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010098
Guido van Rossume97ee181999-12-20 21:27:22 +000010099fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010100done
Guido van Rossume97ee181999-12-20 21:27:22 +000010101
Michael W. Hudson54241132001-12-07 15:38:26 +000010102
Guido van Rossume97ee181999-12-20 21:27:22 +000010103# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10104# loading of modules.
10105
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10107$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010108if test -z "$DYNLOADFILE"
10109then
10110 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010111 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10112 if test "$ac_cv_func_dlopen" = yes
10113 then DYNLOADFILE="dynload_shlib.o"
10114 else DYNLOADFILE="dynload_aix.o"
10115 fi
10116 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010117 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010118 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10119 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010120 *)
10121 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10122 # out any dynamic loading
10123 if test "$ac_cv_func_dlopen" = yes
10124 then DYNLOADFILE="dynload_shlib.o"
10125 else DYNLOADFILE="dynload_stub.o"
10126 fi
10127 ;;
10128 esac
10129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10131$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010132if test "$DYNLOADFILE" != "dynload_stub.o"
10133then
Martin v. Löwis11437992002-04-12 09:54:03 +000010134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010136
10137fi
10138
Neil Schemenauer4e425612001-06-19 15:44:15 +000010139# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10140
Michael W. Hudson54241132001-12-07 15:38:26 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10143$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010144if test -z "$MACHDEP_OBJS"
10145then
Jack Jansene578a632001-08-15 01:27:14 +000010146 MACHDEP_OBJS=$extra_machdep_objs
10147else
10148 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010149fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010150if test -z "$MACHDEP_OBJS"; then
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10152$as_echo "none" >&6; }
10153else
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10155$as_echo "$MACHDEP_OBJS" >&6; }
10156fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010157
Guido van Rossum627b2d71993-12-24 10:39:16 +000010158# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010159for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010160 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010161 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010162 futimens futimes gai_strerror \
10163 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010164 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010165 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010166 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10167 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010168 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010169 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010170 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010171 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010172 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010173 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010174 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10175 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010176 sigaction sigaltstack siginterrupt sigpending sigrelse \
10177 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010178 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010179 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10180 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010181do :
10182 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10183ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010184if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010186#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010187_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010189fi
10190done
10191
Michael W. Hudson54241132001-12-07 15:38:26 +000010192
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010193ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10194 #include <dirent.h>
10195"
10196if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10197
10198$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10199
10200fi
10201
10202
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010203# For some functions, having a definition is not sufficient, since
10204# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10206$as_echo_n "checking for chroot... " >&6; }
10207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010209#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010210int
10211main ()
10212{
10213void *x=chroot
10214 ;
10215 return 0;
10216}
10217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010219
Matthias Kloseb9621712010-04-24 17:59:49 +000010220$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010221
Matthias Kloseb159a552010-04-25 21:00:44 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010223$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010224else
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10226$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010227
10228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10231$as_echo_n "checking for link... " >&6; }
10232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010233/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010234#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010235int
10236main ()
10237{
10238void *x=link
10239 ;
10240 return 0;
10241}
10242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010246
Matthias Kloseb159a552010-04-25 21:00:44 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249else
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252
10253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10256$as_echo_n "checking for symlink... " >&6; }
10257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010259#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010260int
10261main ()
10262{
10263void *x=symlink
10264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010271
Matthias Kloseb159a552010-04-25 21:00:44 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277
10278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10281$as_echo_n "checking for fchdir... " >&6; }
10282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010284#include <unistd.h>
10285int
10286main ()
10287{
10288void *x=fchdir
10289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010296
Matthias Kloseb159a552010-04-25 21:00:44 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010299else
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010302
10303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10306$as_echo_n "checking for fsync... " >&6; }
10307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010309#include <unistd.h>
10310int
10311main ()
10312{
10313void *x=fsync
10314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010321
Matthias Kloseb159a552010-04-25 21:00:44 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324else
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327
10328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10331$as_echo_n "checking for fdatasync... " >&6; }
10332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010334#include <unistd.h>
10335int
10336main ()
10337{
10338void *x=fdatasync
10339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010344
Matthias Kloseb9621712010-04-24 17:59:49 +000010345$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010346
Matthias Kloseb159a552010-04-25 21:00:44 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349else
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352
10353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10356$as_echo_n "checking for epoll... " >&6; }
10357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010358/* end confdefs.h. */
10359#include <sys/epoll.h>
10360int
10361main ()
10362{
10363void *x=epoll_create
10364 ;
10365 return 0;
10366}
10367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010371
Matthias Kloseb159a552010-04-25 21:00:44 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010374else
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010377
10378fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10381$as_echo_n "checking for epoll_create1... " >&6; }
10382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10383/* end confdefs.h. */
10384#include <sys/epoll.h>
10385int
10386main ()
10387{
10388void *x=epoll_create1
10389 ;
10390 return 0;
10391}
10392_ACEOF
10393if ac_fn_c_try_compile "$LINENO"; then :
10394
10395$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10396
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10398$as_echo "yes" >&6; }
10399else
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402
10403fi
10404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10406$as_echo_n "checking for kqueue... " >&6; }
10407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010408/* end confdefs.h. */
10409
10410#include <sys/types.h>
10411#include <sys/event.h>
10412
10413int
10414main ()
10415{
10416int x=kqueue()
10417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010424
Matthias Kloseb159a552010-04-25 21:00:44 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010430
10431fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010433# On some systems (eg. FreeBSD 5), we would find a definition of the
10434# functions ctermid_r, setgroups in the library, but no prototype
10435# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10436# address to avoid compiler warnings and potential miscompilations
10437# because of the missing prototypes.
10438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10440$as_echo_n "checking for ctermid_r... " >&6; }
10441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010442/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010443
Martin v. Löwisd5843682002-11-21 20:41:28 +000010444#include <stdio.h>
10445
Martin v. Löwisd5843682002-11-21 20:41:28 +000010446int
10447main ()
10448{
10449void* p = ctermid_r
10450 ;
10451 return 0;
10452}
10453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010457
Matthias Kloseb159a552010-04-25 21:00:44 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010459$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010460else
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010463
10464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10466
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10468$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010469if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010470 $as_echo_n "(cached) " >&6
10471else
10472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010473/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010474#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010475int
10476main ()
10477{
10478void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010479
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010485 ac_cv_flock_decl=yes
10486else
10487 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010488
10489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010491
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010492fi
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10494$as_echo "$ac_cv_flock_decl" >&6; }
10495if test "x${ac_cv_flock_decl}" = xyes; then
10496 for ac_func in flock
10497do :
10498 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010500 cat >>confdefs.h <<_ACEOF
10501#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010502_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010503
Antoine Pitroua3000072010-09-07 14:52:42 +000010504else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010506$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010507if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010508 $as_echo_n "(cached) " >&6
10509else
10510 ac_check_lib_save_LIBS=$LIBS
10511LIBS="-lbsd $LIBS"
10512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10513/* end confdefs.h. */
10514
10515/* Override any GCC internal prototype to avoid an error.
10516 Use char because int might match the return type of a GCC
10517 builtin and then its argument prototype would still apply. */
10518#ifdef __cplusplus
10519extern "C"
10520#endif
10521char flock ();
10522int
10523main ()
10524{
10525return flock ();
10526 ;
10527 return 0;
10528}
10529_ACEOF
10530if ac_fn_c_try_link "$LINENO"; then :
10531 ac_cv_lib_bsd_flock=yes
10532else
10533 ac_cv_lib_bsd_flock=no
10534fi
10535rm -f core conftest.err conftest.$ac_objext \
10536 conftest$ac_exeext conftest.$ac_ext
10537LIBS=$ac_check_lib_save_LIBS
10538fi
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10540$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010541if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010542 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010543
10544
10545$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10546
10547
10548fi
10549
10550
10551fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010552done
10553
Antoine Pitroua3000072010-09-07 14:52:42 +000010554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10557$as_echo_n "checking for getpagesize... " >&6; }
10558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010559/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010561#include <unistd.h>
10562
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010563int
10564main ()
10565{
10566void* p = getpagesize
10567 ;
10568 return 0;
10569}
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010574
Matthias Kloseb159a552010-04-25 21:00:44 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010576$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010580
10581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010583
Victor Stinner984890f2011-11-24 13:53:38 +010010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10585$as_echo_n "checking for broken unsetenv... " >&6; }
10586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587/* end confdefs.h. */
10588
10589#include <stdlib.h>
10590
10591int
10592main ()
10593{
10594int res = unsetenv("DUMMY")
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599if ac_fn_c_try_compile "$LINENO"; then :
10600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10601$as_echo "no" >&6; }
10602else
10603
10604$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10605
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10607$as_echo "yes" >&6; }
10608
10609fi
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10611
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612for ac_prog in true
10613do
10614 # Extract the first word of "$ac_prog", so it can be a program name with args.
10615set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10617$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010618if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620else
10621 if test -n "$TRUE"; then
10622 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10623else
10624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10625for as_dir in $PATH
10626do
10627 IFS=$as_save_IFS
10628 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010630 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 +000010631 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 $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 +000010633 break 2
10634 fi
10635done
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638
10639fi
10640fi
10641TRUE=$ac_cv_prog_TRUE
10642if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10644$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648fi
10649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651 test -n "$TRUE" && break
10652done
10653test -n "$TRUE" || TRUE="/bin/true"
10654
10655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10657$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010658if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010660else
10661 ac_check_lib_save_LIBS=$LIBS
10662LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010672char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010673int
10674main ()
10675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010682 ac_cv_lib_c_inet_aton=yes
10683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688LIBS=$ac_check_lib_save_LIBS
10689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10691$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010694else
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10696$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010699else
10700 ac_check_lib_save_LIBS=$LIBS
10701LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705/* Override any GCC internal prototype to avoid an error.
10706 Use char because int might match the return type of a GCC
10707 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010708#ifdef __cplusplus
10709extern "C"
10710#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010711char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712int
10713main ()
10714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716 ;
10717 return 0;
10718}
10719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010721 ac_cv_lib_resolv_inet_aton=yes
10722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010725rm -f core conftest.err conftest.$ac_objext \
10726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010727LIBS=$ac_check_lib_save_LIBS
10728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10730$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010731if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732 cat >>confdefs.h <<_ACEOF
10733#define HAVE_LIBRESOLV 1
10734_ACEOF
10735
10736 LIBS="-lresolv $LIBS"
10737
10738fi
10739
10740
10741fi
10742
10743
Christian Heimesd0764e22007-12-04 15:00:33 +000010744# On Tru64, chflags seems to be present, but calling it will
10745# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10747$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010748if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010750else
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010752 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010755/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010756
Christian Heimesd0764e22007-12-04 15:00:33 +000010757#include <sys/stat.h>
10758#include <unistd.h>
10759int main(int argc, char*argv[])
10760{
10761 if(chflags(argv[0], 0) != 0)
10762 return 1;
10763 return 0;
10764}
Ned Deily3eb67d52011-06-28 00:00:28 -070010765
Christian Heimesd0764e22007-12-04 15:00:33 +000010766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010768 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010774fi
10775
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10779$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010780if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010782if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010783 ac_cv_have_chflags="yes"
10784else
10785 ac_cv_have_chflags="no"
10786fi
10787
10788fi
10789if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010792
10793fi
10794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10796$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010797if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010801 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010804/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010805
Christian Heimesd0764e22007-12-04 15:00:33 +000010806#include <sys/stat.h>
10807#include <unistd.h>
10808int main(int argc, char*argv[])
10809{
10810 if(lchflags(argv[0], 0) != 0)
10811 return 1;
10812 return 0;
10813}
Ned Deily3eb67d52011-06-28 00:00:28 -070010814
Christian Heimesd0764e22007-12-04 15:00:33 +000010815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010817 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010823fi
10824
10825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10828$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010829if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010831if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010832 ac_cv_have_lchflags="yes"
10833else
10834 ac_cv_have_lchflags="no"
10835fi
10836
10837fi
10838if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010841
10842fi
10843
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010844case $ac_sys_system/$ac_sys_release in
10845Darwin/*)
10846 _CUR_CFLAGS="${CFLAGS}"
10847 _CUR_LDFLAGS="${LDFLAGS}"
10848 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10849 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10850 ;;
10851esac
10852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10854$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010855if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010857else
10858 ac_check_lib_save_LIBS=$LIBS
10859LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010861/* end confdefs.h. */
10862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863/* Override any GCC internal prototype to avoid an error.
10864 Use char because int might match the return type of a GCC
10865 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010866#ifdef __cplusplus
10867extern "C"
10868#endif
10869char inflateCopy ();
10870int
10871main ()
10872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010874 ;
10875 return 0;
10876}
10877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010879 ac_cv_lib_z_inflateCopy=yes
10880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010883rm -f core conftest.err conftest.$ac_objext \
10884 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010885LIBS=$ac_check_lib_save_LIBS
10886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10888$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010889if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010892
10893fi
10894
10895
10896case $ac_sys_system/$ac_sys_release in
10897Darwin/*)
10898 CFLAGS="${_CUR_CFLAGS}"
10899 LDFLAGS="${_CUR_LDFLAGS}"
10900 ;;
10901esac
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10904$as_echo_n "checking for hstrerror... " >&6; }
10905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010906/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010907
Martin v. Löwise9416172003-05-03 10:12:45 +000010908#include <netdb.h>
10909
Martin v. Löwise9416172003-05-03 10:12:45 +000010910int
10911main ()
10912{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010913void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010914 ;
10915 return 0;
10916}
10917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010921
Matthias Kloseb159a552010-04-25 21:00:44 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010924else
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010927
10928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929rm -f core conftest.err conftest.$ac_objext \
10930 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10933$as_echo_n "checking for inet_aton... " >&6; }
10934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010935/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010936
Martin v. Löwis86d66262006-02-17 08:40:11 +000010937#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010938#include <sys/socket.h>
10939#include <netinet/in.h>
10940#include <arpa/inet.h>
10941
Martin v. Löwise9416172003-05-03 10:12:45 +000010942int
10943main ()
10944{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010945void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010953
Matthias Kloseb159a552010-04-25 21:00:44 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010959
10960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010961rm -f core conftest.err conftest.$ac_objext \
10962 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10965$as_echo_n "checking for inet_pton... " >&6; }
10966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010968
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010969#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010970#include <sys/socket.h>
10971#include <netinet/in.h>
10972#include <arpa/inet.h>
10973
Martin v. Löwise9416172003-05-03 10:12:45 +000010974int
10975main ()
10976{
10977void* p = inet_pton
10978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010985
Matthias Kloseb159a552010-04-25 21:00:44 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
10992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010994
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010995# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10997$as_echo_n "checking for setgroups... " >&6; }
10998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011000
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011001#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011002#ifdef HAVE_GRP_H
11003#include <grp.h>
11004#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011005
Martin v. Löwisd5843682002-11-21 20:41:28 +000011006int
11007main ()
11008{
11009void* p = setgroups
11010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011017
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011023
11024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011026
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011027# check for openpty and forkpty
11028
11029for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011030do :
11031 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011032if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011035_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011037else
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11039$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011040if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011042else
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011044LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048/* Override any GCC internal prototype to avoid an error.
11049 Use char because int might match the return type of a GCC
11050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011051#ifdef __cplusplus
11052extern "C"
11053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ;
11060 return 0;
11061}
11062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011068rm -f core conftest.err conftest.$ac_objext \
11069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011070LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11073$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011074if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011076 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011077else
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11079$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011080if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011082else
11083 ac_check_lib_save_LIBS=$LIBS
11084LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011086/* end confdefs.h. */
11087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088/* Override any GCC internal prototype to avoid an error.
11089 Use char because int might match the return type of a GCC
11090 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011091#ifdef __cplusplus
11092extern "C"
11093#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011094char openpty ();
11095int
11096main ()
11097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011099 ;
11100 return 0;
11101}
11102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011103if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011104 ac_cv_lib_bsd_openpty=yes
11105else
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011108rm -f core conftest.err conftest.$ac_objext \
11109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011110LIBS=$ac_check_lib_save_LIBS
11111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11113$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011114if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116 LIBS="$LIBS -lbsd"
11117fi
11118
11119
11120fi
11121
Fred Drake8cef4cf2000-06-28 16:40:38 +000011122
11123fi
11124done
11125
11126for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011127do :
11128 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011129if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011133
Fred Drake8cef4cf2000-06-28 16:40:38 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11136$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011137if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011139else
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145/* Override any GCC internal prototype to avoid an error.
11146 Use char because int might match the return type of a GCC
11147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011148#ifdef __cplusplus
11149extern "C"
11150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011151char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011152int
11153main ()
11154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011160if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011162else
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011165rm -f core conftest.err conftest.$ac_objext \
11166 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011167LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11170$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011171if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011173 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174else
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11176$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011177if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179else
11180 ac_check_lib_save_LIBS=$LIBS
11181LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011183/* end confdefs.h. */
11184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185/* Override any GCC internal prototype to avoid an error.
11186 Use char because int might match the return type of a GCC
11187 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011188#ifdef __cplusplus
11189extern "C"
11190#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011191char forkpty ();
11192int
11193main ()
11194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011196 ;
11197 return 0;
11198}
11199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011201 ac_cv_lib_bsd_forkpty=yes
11202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011205rm -f core conftest.err conftest.$ac_objext \
11206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011207LIBS=$ac_check_lib_save_LIBS
11208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11210$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011211if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011213 LIBS="$LIBS -lbsd"
11214fi
11215
11216
11217fi
11218
Fred Drake8cef4cf2000-06-28 16:40:38 +000011219
11220fi
11221done
11222
Jack Jansendd19cf82001-12-06 22:36:17 +000011223
Christian Heimesb186d002008-03-18 15:15:01 +000011224# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011225for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011226do :
11227 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011228if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011231_ACEOF
11232
11233fi
11234done
11235
11236
Michael W. Hudson54241132001-12-07 15:38:26 +000011237# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011239do :
11240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011242if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011245_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011248done
11249
Michael W. Hudson54241132001-12-07 15:38:26 +000011250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011251ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011252if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011253 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011254
Martin v. Löwis1142de32002-03-29 16:28:31 +000011255else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011257 *" dup2.$ac_objext "* ) ;;
11258 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011260esac
11261
Martin v. Löwis1142de32002-03-29 16:28:31 +000011262fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011263
11264ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011265if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011266 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11267
11268else
11269 case " $LIBOBJS " in
11270 *" getcwd.$ac_objext "* ) ;;
11271 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11272 ;;
11273esac
11274
11275fi
11276
11277ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011278if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011279 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11280
11281else
11282 case " $LIBOBJS " in
11283 *" strdup.$ac_objext "* ) ;;
11284 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11285 ;;
11286esac
11287
11288fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011289
11290
11291for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011292do :
11293 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011294if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011301int
11302main ()
11303{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011312
Guido van Rossum627b2d71993-12-24 10:39:16 +000011313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011315
Guido van Rossum627b2d71993-12-24 10:39:16 +000011316fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011317done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011318
Jack Jansen150753c2003-03-29 22:07:47 +000011319for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011320do :
11321 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011322if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011328#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011329int
11330main ()
11331{
11332setpgrp(0,0);
11333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011340
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011343
11344fi
11345done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011346
Thomas Wouters3a584202000-08-05 23:28:51 +000011347for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011348do :
11349 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011350if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011356#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011357int
11358main ()
11359{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ;
11362 return 0;
11363}
11364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if ac_fn_c_try_compile "$LINENO"; then :
11366
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367else
Skip Montanaro6dead952003-09-25 14:50:04 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011370
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Guido van Rossum627b2d71993-12-24 10:39:16 +000011372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011376done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011377
Michael W. Hudson54241132001-12-07 15:38:26 +000011378
Victor Stinnere0be4232011-10-25 13:06:09 +020011379for ac_func in clock_gettime
11380do :
11381 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11382if test "x$ac_cv_func_clock_gettime" = xyes; then :
11383 cat >>confdefs.h <<_ACEOF
11384#define HAVE_CLOCK_GETTIME 1
11385_ACEOF
11386
11387else
11388
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11390$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11391if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11392 $as_echo_n "(cached) " >&6
11393else
11394 ac_check_lib_save_LIBS=$LIBS
11395LIBS="-lrt $LIBS"
11396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397/* end confdefs.h. */
11398
11399/* Override any GCC internal prototype to avoid an error.
11400 Use char because int might match the return type of a GCC
11401 builtin and then its argument prototype would still apply. */
11402#ifdef __cplusplus
11403extern "C"
11404#endif
11405char clock_gettime ();
11406int
11407main ()
11408{
11409return clock_gettime ();
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414if ac_fn_c_try_link "$LINENO"; then :
11415 ac_cv_lib_rt_clock_gettime=yes
11416else
11417 ac_cv_lib_rt_clock_gettime=no
11418fi
11419rm -f core conftest.err conftest.$ac_objext \
11420 conftest$ac_exeext conftest.$ac_ext
11421LIBS=$ac_check_lib_save_LIBS
11422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11424$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11425if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11426
11427 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11428
11429
11430$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11431
11432
11433fi
11434
11435
11436fi
11437done
11438
11439
11440for ac_func in clock_getres
11441do :
11442 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11443if test "x$ac_cv_func_clock_getres" = xyes; then :
11444 cat >>confdefs.h <<_ACEOF
11445#define HAVE_CLOCK_GETRES 1
11446_ACEOF
11447
11448else
11449
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11451$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11452if ${ac_cv_lib_rt_clock_getres+:} false; then :
11453 $as_echo_n "(cached) " >&6
11454else
11455 ac_check_lib_save_LIBS=$LIBS
11456LIBS="-lrt $LIBS"
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458/* end confdefs.h. */
11459
11460/* Override any GCC internal prototype to avoid an error.
11461 Use char because int might match the return type of a GCC
11462 builtin and then its argument prototype would still apply. */
11463#ifdef __cplusplus
11464extern "C"
11465#endif
11466char clock_getres ();
11467int
11468main ()
11469{
11470return clock_getres ();
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475if ac_fn_c_try_link "$LINENO"; then :
11476 ac_cv_lib_rt_clock_getres=yes
11477else
11478 ac_cv_lib_rt_clock_getres=no
11479fi
11480rm -f core conftest.err conftest.$ac_objext \
11481 conftest$ac_exeext conftest.$ac_ext
11482LIBS=$ac_check_lib_save_LIBS
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11485$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11486if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11487
11488 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11489
11490
11491fi
11492
11493
11494fi
11495done
11496
11497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11499$as_echo_n "checking for major... " >&6; }
11500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011502
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011503#if defined(MAJOR_IN_MKDEV)
11504#include <sys/mkdev.h>
11505#elif defined(MAJOR_IN_SYSMACROS)
11506#include <sys/sysmacros.h>
11507#else
11508#include <sys/types.h>
11509#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011510
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011511int
11512main ()
11513{
11514
11515 makedev(major(0),minor(0));
11516
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011522
11523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11527$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011528
11529else
Skip Montanaro6dead952003-09-25 14:50:04 +000011530
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011533
11534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011535rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011537
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011538# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011539# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11541$as_echo_n "checking for getaddrinfo... " >&6; }
11542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011544
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011545#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011546#include <sys/socket.h>
11547#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011548#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011549
Martin v. Löwis11437992002-04-12 09:54:03 +000011550int
11551main ()
11552{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011553getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ;
11555 return 0;
11556}
11557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011558if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011559 have_getaddrinfo=yes
11560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011563rm -f core conftest.err conftest.$ac_objext \
11564 conftest$ac_exeext conftest.$ac_ext
11565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11566$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011567if test $have_getaddrinfo = yes
11568then
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11570$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011575
11576if test "${enable_ipv6+set}" = set; then
11577 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11578else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011579 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011580fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011584
11585#include <sys/types.h>
11586#include <netdb.h>
11587#include <string.h>
11588#include <sys/socket.h>
11589#include <netinet/in.h>
11590
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011591int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011592{
11593 int passive, gaierr, inet4 = 0, inet6 = 0;
11594 struct addrinfo hints, *ai, *aitop;
11595 char straddr[INET6_ADDRSTRLEN], strport[16];
11596
11597 for (passive = 0; passive <= 1; passive++) {
11598 memset(&hints, 0, sizeof(hints));
11599 hints.ai_family = AF_UNSPEC;
11600 hints.ai_flags = passive ? AI_PASSIVE : 0;
11601 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011602 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011603 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11604 (void)gai_strerror(gaierr);
11605 goto bad;
11606 }
11607 for (ai = aitop; ai; ai = ai->ai_next) {
11608 if (ai->ai_addr == NULL ||
11609 ai->ai_addrlen == 0 ||
11610 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11611 straddr, sizeof(straddr), strport, sizeof(strport),
11612 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11613 goto bad;
11614 }
11615 switch (ai->ai_family) {
11616 case AF_INET:
11617 if (strcmp(strport, "54321") != 0) {
11618 goto bad;
11619 }
11620 if (passive) {
11621 if (strcmp(straddr, "0.0.0.0") != 0) {
11622 goto bad;
11623 }
11624 } else {
11625 if (strcmp(straddr, "127.0.0.1") != 0) {
11626 goto bad;
11627 }
11628 }
11629 inet4++;
11630 break;
11631 case AF_INET6:
11632 if (strcmp(strport, "54321") != 0) {
11633 goto bad;
11634 }
11635 if (passive) {
11636 if (strcmp(straddr, "::") != 0) {
11637 goto bad;
11638 }
11639 } else {
11640 if (strcmp(straddr, "::1") != 0) {
11641 goto bad;
11642 }
11643 }
11644 inet6++;
11645 break;
11646 case AF_UNSPEC:
11647 goto bad;
11648 break;
11649 default:
11650 /* another family support? */
11651 break;
11652 }
11653 }
11654 }
11655
11656 if (!(inet4 == 0 || inet4 == 2))
11657 goto bad;
11658 if (!(inet6 == 0 || inet6 == 2))
11659 goto bad;
11660
11661 if (aitop)
11662 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011663 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011664
11665 bad:
11666 if (aitop)
11667 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011668 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011669}
11670
Martin v. Löwis11437992002-04-12 09:54:03 +000011671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011673 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011681fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011682
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11686$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11687
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011688if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011689then
11690 if test $ipv6 = yes
11691 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011692 echo 'Fatal: You must get working getaddrinfo() function.'
11693 echo ' or you can specify "--disable-ipv6"'.
11694 exit 1
11695 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011696else
Martin v. Löwis11437992002-04-12 09:54:03 +000011697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011699
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011700fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011701
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011702for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011703do :
11704 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011705if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011707#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011708_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011710fi
11711done
11712
Michael W. Hudson54241132001-12-07 15:38:26 +000011713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11716$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011721/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722#include <sys/types.h>
11723#include <sys/time.h>
11724#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726int
11727main ()
11728{
11729if ((struct tm *) 0)
11730return 0;
11731 ;
11732 return 0;
11733}
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011736 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11743$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011744if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011745
Matthias Kloseb9621712010-04-24 17:59:49 +000011746$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747
11748fi
11749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11751$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757#include <sys/types.h>
11758#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760int
11761main ()
11762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011763struct tm tm;
11764 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 ;
11767 return 0;
11768}
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771 ac_cv_struct_tm=time.h
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11778$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011779if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782
11783fi
11784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785ac_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 +000011786#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788"
Victor Stinnere0be4232011-10-25 13:06:09 +020011789if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
11791cat >>confdefs.h <<_ACEOF
11792#define HAVE_STRUCT_TM_TM_ZONE 1
11793_ACEOF
11794
11795
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011797
Martin v. Löwis11437992002-04-12 09:54:03 +000011798if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11804"
Victor Stinnere0be4232011-10-25 13:06:09 +020011805if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809fi
11810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011811cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813_ACEOF
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11816$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011822#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823#if !HAVE_DECL_TZNAME
11824extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827int
11828main ()
11829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 ;
11832 return 0;
11833}
11834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011836 ac_cv_var_tzname=yes
11837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11844$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011845 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849 fi
11850fi
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852ac_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 +020011853if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
11855cat >>confdefs.h <<_ACEOF
11856#define HAVE_STRUCT_STAT_ST_RDEV 1
11857_ACEOF
11858
11859
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862ac_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 +020011863if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011864
Martin v. Löwis11437992002-04-12 09:54:03 +000011865cat >>confdefs.h <<_ACEOF
11866#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11867_ACEOF
11868
11869
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011870fi
11871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872ac_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 +020011873if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011874
11875cat >>confdefs.h <<_ACEOF
11876#define HAVE_STRUCT_STAT_ST_FLAGS 1
11877_ACEOF
11878
11879
11880fi
11881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882ac_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 +020011883if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011884
11885cat >>confdefs.h <<_ACEOF
11886#define HAVE_STRUCT_STAT_ST_GEN 1
11887_ACEOF
11888
11889
11890fi
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892ac_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 +020011893if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011894
11895cat >>confdefs.h <<_ACEOF
11896#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11897_ACEOF
11898
11899
11900fi
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902ac_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 +020011903if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011904
Martin v. Löwis11437992002-04-12 09:54:03 +000011905cat >>confdefs.h <<_ACEOF
11906#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11907_ACEOF
11908
11909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011911
11912else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011914 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11916 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011917esac
11918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011919fi
11920
Michael W. Hudson54241132001-12-07 15:38:26 +000011921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11924$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011927else
Matthias Kloseb159a552010-04-25 21:00:44 +000011928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011931#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011932int
11933main ()
11934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011935return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 ;
11937 return 0;
11938}
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941 ac_cv_header_time_altzone=yes
11942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011947fi
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11950$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011951if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011954
11955fi
11956
Guido van Rossumda88dad1995-01-26 00:46:29 +000011957was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11959$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011961/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011962
11963#include <sys/types.h>
11964#include <sys/select.h>
11965#include <sys/time.h>
11966
Martin v. Löwis11437992002-04-12 09:54:03 +000011967int
11968main ()
11969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970;
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 ;
11972 return 0;
11973}
11974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011980 was_it_defined=yes
11981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11985$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11988$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011989if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011993/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011994#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011995int
11996main ()
11997{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011998struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 ;
12000 return 0;
12001}
12002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012004 ac_cv_struct_addrinfo=yes
12005else
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12009fi
12010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12012$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012013if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012016
12017fi
12018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12020$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012021if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012025/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012026
12027# include <sys/types.h>
12028# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012032struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 ;
12034 return 0;
12035}
12036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012038 ac_cv_struct_sockaddr_storage=yes
12039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12043fi
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12046$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012047if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012050
12051fi
12052
Guido van Rossum627b2d71993-12-24 10:39:16 +000012053# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12056$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012057if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012063int
12064main ()
12065{
12066static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012067test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
12069 ;
12070 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012071}
Martin v. Löwis11437992002-04-12 09:54:03 +000012072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012074 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12081$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084
12085fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12088$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012089if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095int
12096main ()
12097{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012098/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012099#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012100 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012102 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104 char const *const *pcpcc;
12105 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 /* NEC SVR4.0.2 mips cc rejects this. */
12107 struct point {int x, y;};
12108 static struct point const zero = {0,0};
12109 /* AIX XL C 1.02.0.0 rejects this.
12110 It does not let you subtract one const X* pointer from another in
12111 an arm of an if-expression whose if-part is not a constant
12112 expression */
12113 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116 ++pcpcc;
12117 ppc = (char**) pcpcc;
12118 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012119 { /* SCO 3.2v4 cc rejects this. */
12120 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 }
12126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12127 int x[] = {25, 17};
12128 const int *foo = &x[0];
12129 ++foo;
12130 }
12131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12132 typedef const int *iptr;
12133 iptr p = 0;
12134 ++p;
12135 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012136 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012138 struct s { int j; const int *ap[3]; };
12139 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 }
12141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12142 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012146#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012147
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 ;
12149 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150}
Martin v. Löwis11437992002-04-12 09:54:03 +000012151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012153 ac_cv_c_const=yes
12154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12160$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164
12165fi
12166
Michael W. Hudson54241132001-12-07 15:38:26 +000012167
Guido van Rossumda88dad1995-01-26 00:46:29 +000012168works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12170$as_echo_n "checking for working volatile... " >&6; }
12171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012172/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174int
12175main ()
12176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 ;
12179 return 0;
12180}
12181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012183 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012184else
Skip Montanaro6dead952003-09-25 14:50:04 +000012185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012188
Guido van Rossum627b2d71993-12-24 10:39:16 +000012189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12192$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012193
Guido van Rossumda88dad1995-01-26 00:46:29 +000012194works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12196$as_echo_n "checking for working signed char... " >&6; }
12197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200int
12201main ()
12202{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ;
12205 return 0;
12206}
12207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012209 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012210else
Skip Montanaro6dead952003-09-25 14:50:04 +000012211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012214
Guido van Rossum7f43da71994-08-01 12:15:30 +000012215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12218$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012219
Guido van Rossumda88dad1995-01-26 00:46:29 +000012220have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12222$as_echo_n "checking for prototypes... " >&6; }
12223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012224/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012225int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Matthias Kloseb159a552010-04-25 21:00:44 +000012238 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12242$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243
Guido van Rossumda88dad1995-01-26 00:46:29 +000012244works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12246$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012249
12250#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012251int foo(int x, ...) {
12252 va_list va;
12253 va_start(va, x);
12254 va_arg(va, int);
12255 va_arg(va, char *);
12256 va_arg(va, double);
12257 return 0;
12258}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Guido van Rossum90eea071996-08-30 20:58:57 +000012263return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
12270
Matthias Kloseb9621712010-04-24 17:59:49 +000012271$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012273 works=yes
12274
Guido van Rossum627b2d71993-12-24 10:39:16 +000012275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12278$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012279
Martin v. Löwisd6320502004-08-12 13:45:08 +000012280# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12282$as_echo_n "checking for socketpair... " >&6; }
12283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012284/* end confdefs.h. */
12285
12286#include <sys/types.h>
12287#include <sys/socket.h>
12288
12289int
12290main ()
12291{
12292void *x=socketpair
12293 ;
12294 return 0;
12295}
12296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012300
Matthias Kloseb159a552010-04-25 21:00:44 +000012301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12305$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012306
12307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012309
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012310# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12312$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315#include <sys/types.h>
12316#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320struct sockaddr x;
12321x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 ;
12323 return 0;
12324}
12325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if ac_fn_c_try_compile "$LINENO"; then :
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12328$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012331
12332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12334$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012335
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012338
Guido van Rossumda88dad1995-01-26 00:46:29 +000012339va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12341$as_echo_n "checking whether va_list is an array... " >&6; }
12342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344
12345#ifdef HAVE_STDARG_PROTOTYPES
12346#include <stdarg.h>
12347#else
12348#include <varargs.h>
12349#endif
12350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351int
12352main ()
12353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
12360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361else
Skip Montanaro6dead952003-09-25 14:50:04 +000012362
Martin v. Löwis11437992002-04-12 09:54:03 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
Guido van Rossumda88dad1995-01-26 00:46:29 +000012366 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12371$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012373# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012374
12375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12382$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012383 OLD_CFLAGS=$CFLAGS
12384 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012387
12388# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012393
12394 char *name;
12395 struct hostent *he, *res;
12396 char buffer[2048];
12397 int buflen = 2048;
12398 int h_errnop;
12399
12400 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
12402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012409
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12414$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012416else
Skip Montanaro6dead952003-09-25 14:50:04 +000012417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419$as_echo "no" >&6; }
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12421$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012423/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012425# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Martin v. Löwis11437992002-04-12 09:54:03 +000012427int
12428main ()
12429{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012430
12431 char *name;
12432 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012433 char buffer[2048];
12434 int buflen = 2048;
12435 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012436
Matthias Kloseb159a552010-04-25 21:00:44 +000012437 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
12439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012446
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb159a552010-04-25 21:00:44 +000012448$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12451$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012453else
Skip Montanaro6dead952003-09-25 14:50:04 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12458$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460/* end confdefs.h. */
12461
12462# include <netdb.h>
12463
12464int
12465main ()
12466{
12467
12468 char *name;
12469 struct hostent *he;
12470 struct hostent_data data;
12471
12472 (void) gethostbyname_r(name, he, &data);
12473
12474 ;
12475 return 0;
12476}
12477_ACEOF
12478if ac_fn_c_try_compile "$LINENO"; then :
12479
12480 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12481
12482
12483$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12484
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12486$as_echo "yes" >&6; }
12487
12488else
12489
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12491$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501 CFLAGS=$OLD_CFLAGS
12502
12503else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 for ac_func in gethostbyname
12506do :
12507 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012508if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012511_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012513fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012514done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012515
Michael W. Hudson54241132001-12-07 15:38:26 +000012516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012517fi
12518
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
12520
12521
12522
12523
12524
Guido van Rossum627b2d71993-12-24 10:39:16 +000012525# checks for system services
12526# (none yet)
12527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012528# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012529ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12534$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012535if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012537else
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012539LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543/* Override any GCC internal prototype to avoid an error.
12544 Use char because int might match the return type of a GCC
12545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012546#ifdef __cplusplus
12547extern "C"
12548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012549char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012550int
12551main ()
12552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 ;
12555 return 0;
12556}
12557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560else
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012563rm -f core conftest.err conftest.$ac_objext \
12564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12568$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012569if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 cat >>confdefs.h <<_ACEOF
12571#define HAVE_LIBIEEE 1
12572_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012574 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012575
Guido van Rossum627b2d71993-12-24 10:39:16 +000012576fi
12577
Michael W. Hudson54241132001-12-07 15:38:26 +000012578
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012579fi
12580
Michael W. Hudson54241132001-12-07 15:38:26 +000012581
Guido van Rossum7f253911997-05-09 02:42:48 +000012582# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12584$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012587if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012589if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012590then
12591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12595$as_echo "yes" >&6; }
12596else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12597$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012598fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602fi
12603
Guido van Rossum7f253911997-05-09 02:42:48 +000012604
Guido van Rossum7f43da71994-08-01 12:15:30 +000012605# check for --with-libm=...
12606
Guido van Rossum563e7081996-09-10 18:20:48 +000012607case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012608Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012609*) LIBM=-lm
12610esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12612$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012615if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012617if test "$withval" = no
12618then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12620$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012621elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012622then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12624$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012625else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012626fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12629$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630fi
12631
Guido van Rossum7f43da71994-08-01 12:15:30 +000012632
12633# check for --with-libc=...
12634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12636$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012639if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012641if test "$withval" = no
12642then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12644$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012645elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12648$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012649else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012650fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012651else
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12653$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654fi
12655
Guido van Rossum7f43da71994-08-01 12:15:30 +000012656
Stefan Krah1919b7e2012-03-21 18:25:23 +010012657# **************************************
12658# * Check for gcc x64 inline assembler *
12659# **************************************
12660
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12662$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12664/* end confdefs.h. */
12665
12666int
12667main ()
12668{
12669
12670 __asm__ __volatile__ ("movq %rcx, %rax");
12671
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676if ac_fn_c_try_compile "$LINENO"; then :
12677 have_gcc_asm_for_x64=yes
12678else
12679 have_gcc_asm_for_x64=no
12680fi
12681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12683$as_echo "$have_gcc_asm_for_x64" >&6; }
12684if test "$have_gcc_asm_for_x64" = yes
12685then
12686
12687$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12688
12689fi
12690
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012691# **************************************************
12692# * Check for various properties of floating point *
12693# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12696$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012699else
12700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012702 ac_cv_little_endian_double=no
12703else
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012705/* end confdefs.h. */
12706
12707#include <string.h>
12708int main() {
12709 double x = 9006104071832581.0;
12710 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12711 return 0;
12712 else
12713 return 1;
12714}
12715
12716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012718 ac_cv_little_endian_double=yes
12719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012724fi
12725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012726fi
12727
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12729$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012730if test "$ac_cv_little_endian_double" = yes
12731then
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012734
12735fi
12736
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12738$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012739if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012741else
12742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012744 ac_cv_big_endian_double=no
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012747/* end confdefs.h. */
12748
12749#include <string.h>
12750int main() {
12751 double x = 9006104071832581.0;
12752 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12753 return 0;
12754 else
12755 return 1;
12756}
12757
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012760 ac_cv_big_endian_double=yes
12761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766fi
12767
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012768fi
12769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12771$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012772if test "$ac_cv_big_endian_double" = yes
12773then
12774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012776
12777fi
12778
12779# Some ARM platforms use a mixed-endian representation for doubles.
12780# While Python doesn't currently have full support for these platforms
12781# (see e.g., issue 1762561), we can at least make sure that float <-> string
12782# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12784$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012785if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012787else
12788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790 ac_cv_mixed_endian_double=no
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793/* end confdefs.h. */
12794
12795#include <string.h>
12796int main() {
12797 double x = 9006104071832581.0;
12798 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12799 return 0;
12800 else
12801 return 1;
12802}
12803
12804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012806 ac_cv_mixed_endian_double=yes
12807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012812fi
12813
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012814fi
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12817$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012818if test "$ac_cv_mixed_endian_double" = yes
12819then
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012822
12823fi
12824
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012825# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012826# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012827# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012828# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012829# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012830# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012831
12832# This inline assembler syntax may also work for suncc and icc,
12833# so we try it on all platforms.
12834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12836$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012838/* end confdefs.h. */
12839
12840int
12841main ()
12842{
12843
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012844 unsigned short cw;
12845 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12846 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847
12848 ;
12849 return 0;
12850}
12851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012852if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853 have_gcc_asm_for_x87=yes
12854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012856fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12859$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012860if test "$have_gcc_asm_for_x87" = yes
12861then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012864
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012866
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012867# Detect whether system arithmetic is subject to x87-style double
12868# rounding issues. The result of this test has little meaning on non
12869# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12870# mode is round-to-nearest and double rounding issues are present, and
12871# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12873$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012874# $BASECFLAGS may affect the result
12875ac_save_cc="$CC"
12876CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012877if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012878 ac_cv_x87_double_rounding=no
12879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012881/* end confdefs.h. */
12882
12883#include <stdlib.h>
12884#include <math.h>
12885int main() {
12886 volatile double x, y, z;
12887 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12888 x = 0.99999999999999989; /* 1-2**-53 */
12889 y = 1./x;
12890 if (y != 1.)
12891 exit(0);
12892 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12893 x = 1e16;
12894 y = 2.99999;
12895 z = x + y;
12896 if (z != 1e16+4.)
12897 exit(0);
12898 /* both tests show evidence of double rounding */
12899 exit(1);
12900}
12901
12902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012903if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012904 ac_cv_x87_double_rounding=no
12905else
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012910fi
12911
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012912CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12914$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012915if test "$ac_cv_x87_double_rounding" = yes
12916then
12917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012919
12920fi
12921
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012922# ************************************
12923# * Check for mathematical functions *
12924# ************************************
12925
12926LIBS_SAVE=$LIBS
12927LIBS="$LIBS $LIBM"
12928
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012929for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12930do :
12931 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12932ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012933if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012934 cat >>confdefs.h <<_ACEOF
12935#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12936_ACEOF
12937
12938fi
12939done
12940
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012941for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012942do :
12943 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12944ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012945if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012946 cat >>confdefs.h <<_ACEOF
12947#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12948_ACEOF
12949
12950fi
12951done
12952
12953ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12954"
Victor Stinnere0be4232011-10-25 13:06:09 +020012955if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012956 ac_have_decl=1
12957else
12958 ac_have_decl=0
12959fi
12960
12961cat >>confdefs.h <<_ACEOF
12962#define HAVE_DECL_ISINF $ac_have_decl
12963_ACEOF
12964ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12965"
Victor Stinnere0be4232011-10-25 13:06:09 +020012966if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012967 ac_have_decl=1
12968else
12969 ac_have_decl=0
12970fi
12971
12972cat >>confdefs.h <<_ACEOF
12973#define HAVE_DECL_ISNAN $ac_have_decl
12974_ACEOF
12975ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12976"
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012978 ac_have_decl=1
12979else
12980 ac_have_decl=0
12981fi
12982
12983cat >>confdefs.h <<_ACEOF
12984#define HAVE_DECL_ISFINITE $ac_have_decl
12985_ACEOF
12986
12987
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012988# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12989# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12991$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012994else
12995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012997 ac_cv_tanh_preserves_zero_sign=no
12998else
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013000/* end confdefs.h. */
13001
13002#include <math.h>
13003#include <stdlib.h>
13004int main() {
13005 /* return 0 if either negative zeros don't exist
13006 on this platform or if negative zeros exist
13007 and tanh(-0.) == -0. */
13008 if (atan2(0., -1.) == atan2(-0., -1.) ||
13009 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13010 else exit(1);
13011}
13012
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013015 ac_cv_tanh_preserves_zero_sign=yes
13016else
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13020 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013021fi
13022
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13026$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013027if test "$ac_cv_tanh_preserves_zero_sign" = yes
13028then
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013031
13032fi
13033
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013034if test "$ac_cv_func_log1p" = yes
13035then
13036 # On some versions of AIX, log1p(-0.) returns 0. instead of
13037 # -0. See issue #9920.
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13039$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013040 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013041 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013042else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013043
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013044 if test "$cross_compiling" = yes; then :
13045 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013046else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13048/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013049
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013050 #include <math.h>
13051 #include <stdlib.h>
13052 int main() {
13053 /* Fail if the signs of log1p(-0.) and -0. can be
13054 distinguished. */
13055 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13056 return 0;
13057 else
13058 return 1;
13059 }
13060
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013061_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013062if ac_fn_c_try_run "$LINENO"; then :
13063 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013064else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013065 ac_cv_log1p_drops_zero_sign=yes
13066fi
13067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013069fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013070
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013071fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013072
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13074$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13075fi
13076if test "$ac_cv_log1p_drops_zero_sign" = yes
13077then
13078
13079$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13080
13081fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013082
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013083LIBS=$LIBS_SAVE
13084
Mark Dickinsona614f042009-11-28 12:48:43 +000013085# For multiprocessing module, check that sem_open
13086# actually works. For FreeBSD versions <= 7.2,
13087# the kernel module that provides POSIX semaphores
13088# isn't loaded by default, so an attempt to call
13089# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13091$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013092if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013096 ac_cv_posix_semaphores_enabled=yes
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013099/* end confdefs.h. */
13100
13101#include <unistd.h>
13102#include <fcntl.h>
13103#include <stdio.h>
13104#include <semaphore.h>
13105#include <sys/stat.h>
13106
13107int main(void) {
13108 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13109 if (a == SEM_FAILED) {
13110 perror("sem_open");
13111 return 1;
13112 }
13113 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013114 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013115 return 0;
13116}
13117
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013120 ac_cv_posix_semaphores_enabled=yes
13121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013126fi
13127
13128
Mark Dickinsona614f042009-11-28 12:48:43 +000013129fi
13130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13132$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013133if test $ac_cv_posix_semaphores_enabled = no
13134then
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013137
13138fi
13139
Mark Dickinson10683072009-04-18 21:18:19 +000013140# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13142$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013143if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013150/* end confdefs.h. */
13151
13152#include <unistd.h>
13153#include <fcntl.h>
13154#include <stdio.h>
13155#include <semaphore.h>
13156#include <sys/stat.h>
13157
13158int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013159 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013160 int count;
13161 int res;
13162 if(a==SEM_FAILED){
13163 perror("sem_open");
13164 return 1;
13165
13166 }
13167 res = sem_getvalue(a, &count);
13168 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013169 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013170 return res==-1 ? 1 : 0;
13171}
13172
Mark Dickinson10683072009-04-18 21:18:19 +000013173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013174if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13180 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013181fi
13182
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013184fi
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13187$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188if test $ac_cv_broken_sem_getvalue = yes
13189then
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192
13193fi
13194
Mark Dickinsonbd792642009-03-18 20:06:12 +000013195# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13197$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013198# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013200 enableval=$enable_big_digits; case $enable_big_digits in
13201yes)
13202 enable_big_digits=30 ;;
13203no)
13204 enable_big_digits=15 ;;
1320515|30)
13206 ;;
13207*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013208 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 +000013209esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13211$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013212
13213cat >>confdefs.h <<_ACEOF
13214#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13215_ACEOF
13216
13217
13218else
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13220$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013221fi
13222
13223
Guido van Rossumef2255b2000-03-10 22:30:29 +000013224# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013225ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013226if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
13228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013231 wchar_h="yes"
13232
Guido van Rossumef2255b2000-03-10 22:30:29 +000013233else
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013235
13236fi
13237
Michael W. Hudson54241132001-12-07 15:38:26 +000013238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013240# determine wchar_t size
13241if test "$wchar_h" = yes
13242then
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13248$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13253"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Martin v. Löwis11437992002-04-12 09:54:03 +000013255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 if test "$ac_cv_type_wchar_t" = yes; then
13257 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013259as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013260See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261 else
13262 ac_cv_sizeof_wchar_t=0
13263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13268$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269
13270
13271
Martin v. Löwis11437992002-04-12 09:54:03 +000013272cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013273#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013274_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013275
Michael W. Hudson54241132001-12-07 15:38:26 +000013276
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013277fi
13278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13280$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013281have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013283/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013284
13285#include <tcl.h>
13286#if TCL_UTF_MAX != 6
13287# error "NOT UCS4_TCL"
13288#endif
13289int
13290main ()
13291{
13292
13293 ;
13294 return 0;
13295}
13296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013298
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013301
13302 have_ucs4_tcl=yes
13303
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13307$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013308
Skip Montanaro6dead952003-09-25 14:50:04 +000013309# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013310if test "$wchar_h" = yes
13311then
13312 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13314$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013315 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013317else
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013320 ac_cv_wchar_t_signed=yes
13321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013324
13325 #include <wchar.h>
13326 int main()
13327 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013328 /* Success: exit code 0 */
13329 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013330 }
13331
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013334 ac_cv_wchar_t_signed=yes
13335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013340fi
13341
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013342fi
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13345$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346fi
13347
Georg Brandl52d168a2008-01-07 18:10:24 +000013348# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013349if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013350 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013351then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013352 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Georg Brandl52d168a2008-01-07 18:10:24 +000013356else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013357 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13360$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013361
13362# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13364$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013365if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013367else
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 ac_cv_c_bigendian=unknown
13369 # See if we're dealing with a universal compiler.
13370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13371/* end confdefs.h. */
13372#ifndef __APPLE_CC__
13373 not a universal capable compiler
13374 #endif
13375 typedef int dummy;
13376
Skip Montanaro6dead952003-09-25 14:50:04 +000013377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
13379
13380 # Check for potential -arch flags. It is not universal unless
13381 # there are at least two -arch flags with different values.
13382 ac_arch=
13383 ac_prev=
13384 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13385 if test -n "$ac_prev"; then
13386 case $ac_word in
13387 i?86 | x86_64 | ppc | ppc64)
13388 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13389 ac_arch=$ac_word
13390 else
13391 ac_cv_c_bigendian=universal
13392 break
13393 fi
13394 ;;
13395 esac
13396 ac_prev=
13397 elif test "x$ac_word" = "x-arch"; then
13398 ac_prev=arch
13399 fi
13400 done
13401fi
13402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403 if test $ac_cv_c_bigendian = unknown; then
13404 # See if sys/param.h defines the BYTE_ORDER macro.
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013406/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013407#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410int
13411main ()
13412{
Matthias Kloseb9621712010-04-24 17:59:49 +000013413#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13414 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13415 && LITTLE_ENDIAN)
13416 bogus endian macros
13417 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
13419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013424 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013426/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013427#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013433#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 not big endian
13435 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
13437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013442 ac_cv_c_bigendian=yes
13443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013447fi
13448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13449 fi
13450 if test $ac_cv_c_bigendian = unknown; then
13451 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013453/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013454#include <limits.h>
13455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456int
13457main ()
13458{
Matthias Kloseb9621712010-04-24 17:59:49 +000013459#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13460 bogus endian macros
13461 #endif
13462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
13465}
13466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if ac_fn_c_try_compile "$LINENO"; then :
13468 # It does; now see whether it defined to _BIG_ENDIAN or not.
13469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470/* end confdefs.h. */
13471#include <limits.h>
13472
13473int
13474main ()
13475{
13476#ifndef _BIG_ENDIAN
13477 not big endian
13478 #endif
13479
13480 ;
13481 return 0;
13482}
13483_ACEOF
13484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13490fi
13491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13492 fi
13493 if test $ac_cv_c_bigendian = unknown; then
13494 # Compile a test program.
13495 if test "$cross_compiling" = yes; then :
13496 # Try to guess by grepping values from an object file.
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498/* end confdefs.h. */
13499short int ascii_mm[] =
13500 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13501 short int ascii_ii[] =
13502 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13503 int use_ascii (int i) {
13504 return ascii_mm[i] + ascii_ii[i];
13505 }
13506 short int ebcdic_ii[] =
13507 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13508 short int ebcdic_mm[] =
13509 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13510 int use_ebcdic (int i) {
13511 return ebcdic_mm[i] + ebcdic_ii[i];
13512 }
13513 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515int
13516main ()
13517{
13518return use_ascii (foo) == use_ebcdic (foo);
13519 ;
13520 return 0;
13521}
13522_ACEOF
13523if ac_fn_c_try_compile "$LINENO"; then :
13524 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13525 ac_cv_c_bigendian=yes
13526 fi
13527 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13528 if test "$ac_cv_c_bigendian" = unknown; then
13529 ac_cv_c_bigendian=no
13530 else
13531 # finding both strings is unlikely to happen, but who knows?
13532 ac_cv_c_bigendian=unknown
13533 fi
13534 fi
13535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 /* Are we little or big endian? From Harbison&Steele. */
13546 union
13547 {
13548 long int l;
13549 char c[sizeof (long int)];
13550 } u;
13551 u.l = 1;
13552 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553
13554 ;
13555 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013556}
Martin v. Löwis11437992002-04-12 09:54:03 +000013557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013559 ac_cv_c_bigendian=no
13560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13570$as_echo "$ac_cv_c_bigendian" >&6; }
13571 case $ac_cv_c_bigendian in #(
13572 yes)
13573 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13574;; #(
13575 no)
13576 ;; #(
13577 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 ;; #(
13582 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013583 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013584 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013586
Michael W. Hudson54241132001-12-07 15:38:26 +000013587
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013588# ABI version string for Python extension modules. This appears between the
13589# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13590# from the following attributes which affect the ABI of this Python build (in
13591# this order):
13592#
13593# * The Python implementation (always 'cpython-' for us)
13594# * The major and minor version numbers
13595# * --with-pydebug (adds a 'd')
13596# * --with-pymalloc (adds a 'm')
13597# * --with-wide-unicode (adds a 'u')
13598#
13599# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013600# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13601# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013602
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13604$as_echo_n "checking ABIFLAGS... " >&6; }
13605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13606$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13608$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013609SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13611$as_echo "$SOABI" >&6; }
13612
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13614$as_echo_n "checking LDVERSION... " >&6; }
13615LDVERSION='$(VERSION)$(ABIFLAGS)'
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13617$as_echo "$LDVERSION" >&6; }
13618
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013619# SO is the extension of shared libraries `(including the dot!)
13620# -- usually .so, .sl on HP-UX, .dll on Cygwin
13621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13622$as_echo_n "checking SO... " >&6; }
13623if test -z "$SO"
13624then
13625 case $ac_sys_system in
13626 hp*|HP*)
13627 case `uname -m` in
13628 ia64) SO=.so;;
13629 *) SO=.sl;;
13630 esac
13631 ;;
13632 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013633 Linux*|GNU*)
13634 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013635 *) SO=.so;;
13636 esac
13637else
13638 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013639 echo
13640 echo '====================================================================='
13641 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013642 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013643 echo '+ Do you really mean to change the extension for shared libraries? +'
13644 echo '+ Continuing in 10 seconds to let you to ponder. +'
13645 echo '+ +'
13646 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013647 sleep 10
13648fi
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13650$as_echo "$SO" >&6; }
13651
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013652# Check whether right shifting a negative integer extends the sign bit
13653# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13655$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013656if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013658else
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013661 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013664/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013665
13666int main()
13667{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013668 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013669}
13670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013672if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013673 ac_cv_rshift_extends_sign=yes
13674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013679fi
13680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681fi
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13684$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013685if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013686then
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013689
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013690fi
13691
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013692# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13694$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013700/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013701#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013702int
13703main ()
13704{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013705
13706 FILE *f = fopen("/dev/null", "r");
13707 flockfile(f);
13708 getc_unlocked(f);
13709 funlockfile(f);
13710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013716 ac_cv_have_getc_unlocked=yes
13717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 ac_cv_have_getc_unlocked=no
13719fi
13720rm -f core conftest.err conftest.$ac_objext \
13721 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13725$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013726if test "$ac_cv_have_getc_unlocked" = yes
13727then
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013730
13731fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013732
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013733# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013734# save the value of LIBS so we don't actually link Python with readline
13735LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013736
Gregory P. Smith18820942008-09-07 06:24:49 +000013737# On some systems we need to link readline to a termcap compatible
13738# library. NOTE: Keep the precedence of listed libraries synchronised
13739# with setup.py.
13740py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13742$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013743for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013744 if test -z "$py_libtermcap"; then
13745 READLINE_LIBS="-lreadline"
13746 else
13747 READLINE_LIBS="-lreadline -l$py_libtermcap"
13748 fi
13749 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013751/* end confdefs.h. */
13752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753/* Override any GCC internal prototype to avoid an error.
13754 Use char because int might match the return type of a GCC
13755 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013756#ifdef __cplusplus
13757extern "C"
13758#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013759char readline ();
13760int
13761main ()
13762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013764 ;
13765 return 0;
13766}
13767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013768if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013769 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013771rm -f core conftest.err conftest.$ac_objext \
13772 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013773 if test $py_cv_lib_readline = yes; then
13774 break
13775 fi
13776done
13777# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13778#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013779if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13781$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13784$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013787
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013788fi
13789
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013790# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13792$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013793if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013794 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795else
13796 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013797LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013799/* end confdefs.h. */
13800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801/* Override any GCC internal prototype to avoid an error.
13802 Use char because int might match the return type of a GCC
13803 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804#ifdef __cplusplus
13805extern "C"
13806#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807char rl_callback_handler_install ();
13808int
13809main ()
13810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013812 ;
13813 return 0;
13814}
13815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817 ac_cv_lib_readline_rl_callback_handler_install=yes
13818else
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013821rm -f core conftest.err conftest.$ac_objext \
13822 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013823LIBS=$ac_check_lib_save_LIBS
13824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13826$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013827if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830
13831fi
13832
13833
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013834# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013836/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013837#include <readline/readline.h>
13838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013839if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013840 have_readline=yes
13841else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013842 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013843
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013844fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013845rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013846if test $have_readline = yes
13847then
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013849/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013850#include <readline/readline.h>
13851
13852_ACEOF
13853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013857
13858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013859rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013862/* end confdefs.h. */
13863#include <readline/readline.h>
13864
13865_ACEOF
13866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013870
13871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013872rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013873
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013874fi
13875
Martin v. Löwis0daad592001-09-30 21:09:59 +000013876# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13878$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013879if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013881else
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013883LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887/* Override any GCC internal prototype to avoid an error.
13888 Use char because int might match the return type of a GCC
13889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013890#ifdef __cplusplus
13891extern "C"
13892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013893char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013894int
13895main ()
13896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 ;
13899 return 0;
13900}
13901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013907rm -f core conftest.err conftest.$ac_objext \
13908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013909LIBS=$ac_check_lib_save_LIBS
13910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13912$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013913if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013916
Martin v. Löwis0daad592001-09-30 21:09:59 +000013917fi
13918
Michael W. Hudson54241132001-12-07 15:38:26 +000013919
Thomas Wouters89d996e2007-09-08 17:39:28 +000013920# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13922$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013923if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013925else
13926 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013927LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013929/* end confdefs.h. */
13930
13931/* Override any GCC internal prototype to avoid an error.
13932 Use char because int might match the return type of a GCC
13933 builtin and then its argument prototype would still apply. */
13934#ifdef __cplusplus
13935extern "C"
13936#endif
13937char rl_completion_display_matches_hook ();
13938int
13939main ()
13940{
13941return rl_completion_display_matches_hook ();
13942 ;
13943 return 0;
13944}
13945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013947 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013951rm -f core conftest.err conftest.$ac_objext \
13952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013953LIBS=$ac_check_lib_save_LIBS
13954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13956$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013957if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013960
13961fi
13962
13963
Martin v. Löwis0daad592001-09-30 21:09:59 +000013964# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13966$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013971LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975/* Override any GCC internal prototype to avoid an error.
13976 Use char because int might match the return type of a GCC
13977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013978#ifdef __cplusplus
13979extern "C"
13980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013981char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ;
13987 return 0;
13988}
13989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013992else
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013995rm -f core conftest.err conftest.$ac_objext \
13996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013997LIBS=$ac_check_lib_save_LIBS
13998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14000$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014001if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014004
Guido van Rossum353ae582001-07-10 16:45:32 +000014005fi
14006
Jack Jansendd19cf82001-12-06 22:36:17 +000014007
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014008# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014010/* end confdefs.h. */
14011#include <readline/readline.h>
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014014 have_readline=yes
14015else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014016 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014017
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014018fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014019rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014020if test $have_readline = yes
14021then
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014023/* end confdefs.h. */
14024#include <readline/readline.h>
14025
14026_ACEOF
14027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014031
14032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014033rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014034
14035fi
14036
Martin v. Löwis82bca632006-02-10 20:49:30 +000014037# End of readline checks: restore LIBS
14038LIBS=$LIBS_no_readline
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14041$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014042if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014044else
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014047 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014048else
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014050/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014051
14052int main()
14053{
14054 int val1 = nice(1);
14055 if (val1 != -1 && val1 == nice(2))
14056 exit(0);
14057 exit(1);
14058}
14059
Martin v. Löwis11437992002-04-12 09:54:03 +000014060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014062 ac_cv_broken_nice=yes
14063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014068fi
14069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070fi
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14073$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014074if test "$ac_cv_broken_nice" = yes
14075then
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014078
14079fi
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14082$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014085else
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014087 ac_cv_broken_poll=no
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014090/* end confdefs.h. */
14091
14092#include <poll.h>
14093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014094int main()
14095{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014096 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014097 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014098
14099 close (42);
14100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014101 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014102 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014103 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014104 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014105 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014106 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014107 return 1;
14108}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014109
14110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014112 ac_cv_broken_poll=yes
14113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014120fi
14121
Matthias Kloseb9621712010-04-24 17:59:49 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14123$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014124if test "$ac_cv_broken_poll" = yes
14125then
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014128
14129fi
14130
Brett Cannon43802422005-02-10 20:48:03 +000014131# 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 +000014132# (which is not required by ISO C or UNIX spec) and/or if we support
14133# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014134ac_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 +000014135#include <$ac_cv_struct_tm>
14136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137"
Victor Stinnere0be4232011-10-25 13:06:09 +020014138if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014139
14140cat >>confdefs.h <<_ACEOF
14141#define HAVE_STRUCT_TM_TM_ZONE 1
14142_ACEOF
14143
14144
14145fi
14146
14147if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014150
14151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14153"
Victor Stinnere0be4232011-10-25 13:06:09 +020014154if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156else
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158fi
14159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162_ACEOF
14163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14165$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014166if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014170/* end confdefs.h. */
14171#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172#if !HAVE_DECL_TZNAME
14173extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014174#endif
14175
14176int
14177main ()
14178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014180 ;
14181 return 0;
14182}
14183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014185 ac_cv_var_tzname=yes
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014189rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14193$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014194 if test $ac_cv_var_tzname = yes; then
14195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014197
14198 fi
14199fi
14200
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014201
Martin v. Löwis1d459062005-03-14 21:23:33 +000014202# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14204$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014205if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014207else
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014210 ac_cv_working_tzset=no
14211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014213/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014214
14215#include <stdlib.h>
14216#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014217#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014218
14219#if HAVE_TZNAME
14220extern char *tzname[];
14221#endif
14222
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014223int main()
14224{
Brett Cannon18367812003-09-19 00:59:16 +000014225 /* Note that we need to ensure that not only does tzset(3)
14226 do 'something' with localtime, but it works as documented
14227 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014228 This includes making sure that tzname is set properly if
14229 tm->tm_zone does not exist since it is the alternative way
14230 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014231
14232 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014233 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014234 */
14235
Martin v. Löwis1d459062005-03-14 21:23:33 +000014236 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014237 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14238
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014239 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014240 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014241 if (localtime(&groundhogday)->tm_hour != 0)
14242 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014243#if HAVE_TZNAME
14244 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14245 if (strcmp(tzname[0], "UTC") ||
14246 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14247 exit(1);
14248#endif
Brett Cannon18367812003-09-19 00:59:16 +000014249
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014250 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014251 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014252 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014253 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014254#if HAVE_TZNAME
14255 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14256 exit(1);
14257#endif
Brett Cannon18367812003-09-19 00:59:16 +000014258
14259 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14260 tzset();
14261 if (localtime(&groundhogday)->tm_hour != 11)
14262 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014263#if HAVE_TZNAME
14264 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14265 exit(1);
14266#endif
14267
14268#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014269 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14270 exit(1);
14271 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14272 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014273#endif
Brett Cannon18367812003-09-19 00:59:16 +000014274
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014275 exit(0);
14276}
14277
14278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 ac_cv_working_tzset=yes
14281else
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014286fi
14287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288fi
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14291$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014292if test "$ac_cv_working_tzset" = yes
14293then
14294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014296
14297fi
14298
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014299# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14301$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014302if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014303 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014304else
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014306/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014307#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014308int
14309main ()
14310{
14311
14312struct stat st;
14313st.st_mtim.tv_nsec = 1;
14314
14315 ;
14316 return 0;
14317}
14318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014320 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014321else
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14325fi
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14328$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014329if test "$ac_cv_stat_tv_nsec" = yes
14330then
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014333
14334fi
14335
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014336# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14338$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014339if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014341else
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014343/* end confdefs.h. */
14344#include <sys/stat.h>
14345int
14346main ()
14347{
14348
14349struct stat st;
14350st.st_mtimespec.tv_nsec = 1;
14351
14352 ;
14353 return 0;
14354}
14355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014357 ac_cv_stat_tv_nsec2=yes
14358else
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14362fi
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14365$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014366if test "$ac_cv_stat_tv_nsec2" = yes
14367then
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014370
14371fi
14372
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014373ac_save_cppflags="$CPPFLAGS"
14374CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014375# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14377$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014378if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014382/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014383#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
14385main ()
14386{
Jack Jansen666b1e72001-10-31 12:11:48 +000014387
14388 int rtn;
14389 rtn = mvwdelch(0,0,0);
14390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 ;
14392 return 0;
14393}
14394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014395if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014396 ac_cv_mvwdelch_is_expression=yes
14397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14401fi
14402
Matthias Kloseb9621712010-04-24 17:59:49 +000014403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14404$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014405
14406if test "$ac_cv_mvwdelch_is_expression" = yes
14407then
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014410
14411fi
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14414$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014415if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014417else
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014419/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014420#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014421int
14422main ()
14423{
Jack Jansen666b1e72001-10-31 12:11:48 +000014424
14425 WINDOW *w;
14426 w->_flags = 0;
14427
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 ;
14429 return 0;
14430}
14431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014432if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014433 ac_cv_window_has_flags=yes
14434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438fi
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14441$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014442
Jack Jansen666b1e72001-10-31 12:11:48 +000014443
14444if test "$ac_cv_window_has_flags" = yes
14445then
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014448
14449fi
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14452$as_echo_n "checking for is_term_resized... " >&6; }
14453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014454/* end confdefs.h. */
14455#include <curses.h>
14456int
14457main ()
14458{
14459void *x=is_term_resized
14460 ;
14461 return 0;
14462}
14463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014467
Matthias Kloseb159a552010-04-25 21:00:44 +000014468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014469$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14472$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014473
14474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14478$as_echo_n "checking for resize_term... " >&6; }
14479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014480/* end confdefs.h. */
14481#include <curses.h>
14482int
14483main ()
14484{
14485void *x=resize_term
14486 ;
14487 return 0;
14488}
14489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014490if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014493
Matthias Kloseb159a552010-04-25 21:00:44 +000014494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14498$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014499
14500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14504$as_echo_n "checking for resizeterm... " >&6; }
14505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014506/* end confdefs.h. */
14507#include <curses.h>
14508int
14509main ()
14510{
14511void *x=resizeterm
14512 ;
14513 return 0;
14514}
14515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014516if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014519
Matthias Kloseb159a552010-04-25 21:00:44 +000014520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014521$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14524$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014525
14526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014528# last curses configure check
14529CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14532$as_echo "$as_me: checking for device files" >&6;}
14533
14534if test "x$cross_compiling" = xyes; then
14535 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14537$as_echo_n "checking for /dev/ptmx... " >&6; }
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14539$as_echo "not set" >&6; }
14540 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14541 fi
14542 if test "${ac_cv_file__dev_ptc+set}" != set; then
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14544$as_echo_n "checking for /dev/ptc... " >&6; }
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14546$as_echo "not set" >&6; }
14547 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14548 fi
14549fi
14550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14552$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014553if ${ac_cv_file__dev_ptmx+:} false; then :
14554 $as_echo_n "(cached) " >&6
14555else
14556 test "$cross_compiling" = yes &&
14557 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14558if test -r "/dev/ptmx"; then
14559 ac_cv_file__dev_ptmx=yes
14560else
14561 ac_cv_file__dev_ptmx=no
14562fi
14563fi
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14565$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14566if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014567
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014568fi
14569
14570if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014573
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14576$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014577if ${ac_cv_file__dev_ptc+:} false; then :
14578 $as_echo_n "(cached) " >&6
14579else
14580 test "$cross_compiling" = yes &&
14581 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14582if test -r "/dev/ptc"; then
14583 ac_cv_file__dev_ptc=yes
14584else
14585 ac_cv_file__dev_ptc=no
14586fi
14587fi
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14589$as_echo "$ac_cv_file__dev_ptc" >&6; }
14590if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014591
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014592fi
14593
14594if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014597
Neal Norwitz865400f2003-03-21 01:42:58 +000014598fi
14599
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014600if test "$have_long_long" = yes
14601then
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14603$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014604 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014608 ac_cv_have_long_long_format="cross -- assuming no"
14609 if test x$GCC = xyes; then
14610 save_CFLAGS=$CFLAGS
14611 CFLAGS="$CFLAGS -Werror -Wformat"
14612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14613/* end confdefs.h. */
14614
14615 #include <stdio.h>
14616 #include <stddef.h>
14617
14618int
14619main ()
14620{
14621
14622 char *buffer;
14623 sprintf(buffer, "%lld", (long long)123);
14624 sprintf(buffer, "%lld", (long long)-123);
14625 sprintf(buffer, "%llu", (unsigned long long)123);
14626
14627 ;
14628 return 0;
14629}
14630_ACEOF
14631if ac_fn_c_try_compile "$LINENO"; then :
14632 ac_cv_have_long_long_format=yes
14633
14634fi
14635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636 CFLAGS=$save_CFLAGS
14637 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014640/* end confdefs.h. */
14641
14642 #include <stdio.h>
14643 #include <stddef.h>
14644 #include <string.h>
14645
14646 #ifdef HAVE_SYS_TYPES_H
14647 #include <sys/types.h>
14648 #endif
14649
14650 int main()
14651 {
14652 char buffer[256];
14653
14654 if (sprintf(buffer, "%lld", (long long)123) < 0)
14655 return 1;
14656 if (strcmp(buffer, "123"))
14657 return 1;
14658
14659 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14660 return 1;
14661 if (strcmp(buffer, "-123"))
14662 return 1;
14663
14664 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14665 return 1;
14666 if (strcmp(buffer, "123"))
14667 return 1;
14668
14669 return 0;
14670 }
14671
14672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014673if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014674 ac_cv_have_long_long_format=yes
14675else
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014680fi
14681
14682
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014683fi
14684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14686$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014687fi
14688
Mark Dickinson89d7d412009-12-31 20:50:59 +000014689if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014690then
14691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014693
14694fi
14695
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014696if test $ac_sys_system = Darwin
14697then
14698 LIBS="$LIBS -framework CoreFoundation"
14699fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14702$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014703if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014707 ac_cv_have_size_t_format="cross -- assuming yes"
14708
Thomas Wouters477c8d52006-05-27 19:21:47 +000014709else
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014711/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014712
Thomas Wouters477c8d52006-05-27 19:21:47 +000014713#include <stdio.h>
14714#include <stddef.h>
14715#include <string.h>
14716
Christian Heimes2c181612007-12-17 20:04:13 +000014717#ifdef HAVE_SYS_TYPES_H
14718#include <sys/types.h>
14719#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014720
14721#ifdef HAVE_SSIZE_T
14722typedef ssize_t Py_ssize_t;
14723#elif SIZEOF_VOID_P == SIZEOF_LONG
14724typedef long Py_ssize_t;
14725#else
14726typedef int Py_ssize_t;
14727#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014728
Christian Heimes2c181612007-12-17 20:04:13 +000014729int main()
14730{
14731 char buffer[256];
14732
Thomas Wouters477c8d52006-05-27 19:21:47 +000014733 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14734 return 1;
14735
Thomas Wouters89f507f2006-12-13 04:49:30 +000014736 if (strcmp(buffer, "123"))
14737 return 1;
14738
14739 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14740 return 1;
14741
14742 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014743 return 1;
14744
14745 return 0;
14746}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014747
Thomas Wouters477c8d52006-05-27 19:21:47 +000014748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014750 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014756fi
14757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14760$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014761if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014764
14765fi
14766
Matthias Kloseb9621712010-04-24 17:59:49 +000014767ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014768#ifdef HAVE_SYS_TYPES_H
14769#include <sys/types.h>
14770#endif
14771#ifdef HAVE_SYS_SOCKET_H
14772#include <sys/socket.h>
14773#endif
14774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775"
Victor Stinnere0be4232011-10-25 13:06:09 +020014776if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014777
Martin v. Löwis11437992002-04-12 09:54:03 +000014778else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014781
14782fi
14783
Michael W. Hudson54241132001-12-07 15:38:26 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14786$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014787if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014789else
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014791 ac_cv_broken_mbstowcs=no
14792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014794/* end confdefs.h. */
14795
14796#include<stdlib.h>
14797int main() {
14798 size_t len = -1;
14799 const char *str = "text";
14800 len = mbstowcs(NULL, str, 0);
14801 return (len != 4);
14802}
14803
14804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014805if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014806 ac_cv_broken_mbstowcs=no
14807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014812fi
14813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014814fi
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14817$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014818if test "$ac_cv_broken_mbstowcs" = yes
14819then
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014822
14823fi
14824
Antoine Pitroub52ec782009-01-25 16:34:23 +000014825# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14827$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014828
14829# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014831 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014832if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014833then
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14838$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014839fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014840if test "$withval" = no
14841then
14842
14843$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14846$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014847fi
14848
Antoine Pitrou042b1282010-08-13 21:15:58 +000014849else
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14851$as_echo "no value specified" >&6; }
14852fi
14853
Antoine Pitroub52ec782009-01-25 16:34:23 +000014854
Matthias Kloseb17289e2012-03-15 19:51:34 +010014855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14856$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14857if ${ac_cv_computed_gotos+:} false; then :
14858 $as_echo_n "(cached) " >&6
14859else
14860 if test "$cross_compiling" = yes; then :
14861 if test "${with_computed_gotos+set}" = set; then
14862 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14863 else
14864 ac_cv_computed_gotos=no
14865 fi
14866else
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868/* end confdefs.h. */
14869
14870int main(int argc, char **argv)
14871{
14872 static void *targets[1] = { &&LABEL1 };
14873 goto LABEL2;
14874LABEL1:
14875 return 0;
14876LABEL2:
14877 goto *targets[0];
14878 return 1;
14879}
14880
14881_ACEOF
14882if ac_fn_c_try_run "$LINENO"; then :
14883 ac_cv_computed_gotos=yes
14884else
14885 ac_cv_computed_gotos=no
14886fi
14887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14888 conftest.$ac_objext conftest.beam conftest.$ac_ext
14889fi
14890
14891fi
14892
14893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14894$as_echo "$ac_cv_computed_gotos" >&6; }
14895case "$ac_cv_computed_gotos" in yes*)
14896
14897$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14898
14899esac
14900
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014901case $ac_sys_system in
14902AIX*)
14903
14904$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14905 ;;
14906esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014909
14910
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014911for h in `(cd $srcdir;echo Python/thread_*.h)`
14912do
14913 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14914done
14915
Michael W. Hudson54241132001-12-07 15:38:26 +000014916
Neal Norwitzd24499d2005-12-18 21:36:39 +000014917SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14919$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014920for dir in $SRCDIRS; do
14921 if test ! -d $dir; then
14922 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014923 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014924done
Matthias Kloseb9621712010-04-24 17:59:49 +000014925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14926$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014927
Stefan Krah1919b7e2012-03-21 18:25:23 +010014928# Availability of -O2:
14929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14930$as_echo_n "checking for -O2... " >&6; }
14931saved_cflags="$CFLAGS"
14932CFLAGS="-O2"
14933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934/* end confdefs.h. */
14935
14936int
14937main ()
14938{
14939
14940
14941 ;
14942 return 0;
14943}
14944_ACEOF
14945if ac_fn_c_try_compile "$LINENO"; then :
14946 have_O2=yes
14947else
14948 have_O2=no
14949fi
14950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14952$as_echo "$have_O2" >&6; }
14953CFLAGS="$saved_cflags"
14954
14955# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14956# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14958$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14959saved_cflags="$CFLAGS"
14960CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14961if test "$have_O2" = no; then
14962 CFLAGS=""
14963fi
14964if test "$cross_compiling" = yes; then :
14965 have_glibc_memmove_bug=undefined
14966else
14967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14968/* end confdefs.h. */
14969
14970#include <stdio.h>
14971#include <stdlib.h>
14972#include <string.h>
14973void foo(void *p, void *q) { memmove(p, q, 19); }
14974int main() {
14975 char a[32] = "123456789000000000";
14976 foo(&a[9], a);
14977 if (strcmp(a, "123456789123456789000000000") != 0)
14978 return 1;
14979 foo(a, &a[9]);
14980 if (strcmp(a, "123456789000000000") != 0)
14981 return 1;
14982 return 0;
14983}
14984
14985_ACEOF
14986if ac_fn_c_try_run "$LINENO"; then :
14987 have_glibc_memmove_bug=no
14988else
14989 have_glibc_memmove_bug=yes
14990fi
14991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14992 conftest.$ac_objext conftest.beam conftest.$ac_ext
14993fi
14994
14995CFLAGS="$saved_cflags"
14996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14997$as_echo "$have_glibc_memmove_bug" >&6; }
14998if test "$have_glibc_memmove_bug" = yes; then
14999
15000$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15001
15002fi
15003
15004if test "$have_gcc_asm_for_x87" = yes; then
15005 # Some versions of gcc miscompile inline asm:
15006 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15007 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15008 case $CC in
15009 *gcc*)
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15011$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15012 saved_cflags="$CFLAGS"
15013 CFLAGS="-O2"
15014 if test "$cross_compiling" = yes; then :
15015 have_ipa_pure_const_bug=undefined
15016else
15017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h. */
15019
15020 __attribute__((noinline)) int
15021 foo(int *p) {
15022 int r;
15023 asm ( "movl \$6, (%1)\n\t"
15024 "xorl %0, %0\n\t"
15025 : "=r" (r) : "r" (p) : "memory"
15026 );
15027 return r;
15028 }
15029 int main() {
15030 int p = 8;
15031 if ((foo(&p) ? : p) != 6)
15032 return 1;
15033 return 0;
15034 }
15035
15036_ACEOF
15037if ac_fn_c_try_run "$LINENO"; then :
15038 have_ipa_pure_const_bug=no
15039else
15040 have_ipa_pure_const_bug=yes
15041fi
15042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15043 conftest.$ac_objext conftest.beam conftest.$ac_ext
15044fi
15045
15046 CFLAGS="$saved_cflags"
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15048$as_echo "$have_ipa_pure_const_bug" >&6; }
15049 if test "$have_ipa_pure_const_bug" = yes; then
15050
15051$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15052
15053 fi
15054 ;;
15055 esac
15056fi
15057
Guido van Rossum627b2d71993-12-24 10:39:16 +000015058# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015059ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015060
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015061ac_config_files="$ac_config_files Modules/ld_so_aix"
15062
Martin v. Löwis11437992002-04-12 09:54:03 +000015063cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064# This file is a shell script that caches the results of configure
15065# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015066# scripts and configure runs, see configure's option --config-cache.
15067# It is not useful on other systems. If it contains results you don't
15068# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069#
Martin v. Löwis11437992002-04-12 09:54:03 +000015070# config.status only pays attention to the cache file if you give it
15071# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072#
Skip Montanaro6dead952003-09-25 14:50:04 +000015073# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015074# loading this file, other *unset* `ac_cv_foo' will be assigned the
15075# following values.
15076
15077_ACEOF
15078
Guido van Rossumf78abae1997-01-21 22:02:36 +000015079# The following way of writing the cache mishandles newlines in values,
15080# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015082# Ultrix sh set writes to stderr and can't be redirected directly,
15083# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084(
15085 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15086 eval ac_val=\$$ac_var
15087 case $ac_val in #(
15088 *${as_nl}*)
15089 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15091$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 esac
15093 case $ac_var in #(
15094 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15096 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097 esac ;;
15098 esac
15099 done
15100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15103 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 # `set' does not quote correctly, so add quotes: double-quote
15105 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015107 "s/'/'\\\\''/g;
15108 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 *)
15111 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 esac |
15115 sort
15116) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15122 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15124 :end' >>confcache
15125if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15126 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015127 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15129$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015130 if test ! -f "$cache_file" || test -h "$cache_file"; then
15131 cat confcache >"$cache_file"
15132 else
15133 case $cache_file in #(
15134 */* | ?:*)
15135 mv -f confcache "$cache_file"$$ &&
15136 mv -f "$cache_file"$$ "$cache_file" ;; #(
15137 *)
15138 mv -f confcache "$cache_file" ;;
15139 esac
15140 fi
15141 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015142 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15144$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015145 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015147rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015148
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015149test "x$prefix" = xNONE && prefix=$ac_default_prefix
15150# Let make expand exec_prefix.
15151test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015152
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015153DEFS=-DHAVE_CONFIG_H
15154
Skip Montanaro6dead952003-09-25 14:50:04 +000015155ac_libobjs=
15156ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015157U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015158for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15159 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15163 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15165 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015166done
15167LIBOBJS=$ac_libobjs
15168
15169LTLIBOBJS=$ac_ltlibobjs
15170
15171
Martin v. Löwis11437992002-04-12 09:54:03 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173
Victor Stinnere0be4232011-10-25 13:06:09 +020015174: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015175ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015176ac_clean_files_save=$ac_clean_files
15177ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015178{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15179$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15180as_write_fail=0
15181cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015182#! $SHELL
15183# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015184# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015185# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015186# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015187
Martin v. Löwis11437992002-04-12 09:54:03 +000015188debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015189ac_cs_recheck=false
15190ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015191
Matthias Kloseb9621712010-04-24 17:59:49 +000015192SHELL=\${CONFIG_SHELL-$SHELL}
15193export SHELL
15194_ASEOF
15195cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15196## -------------------- ##
15197## M4sh Initialization. ##
15198## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200# Be more Bourne compatible
15201DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015202if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 emulate sh
15204 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015206 # is contrary to our usage. Disable this feature.
15207 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015209else
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 case `(set -o) 2>/dev/null` in #(
15211 *posix*) :
15212 set -o posix ;; #(
15213 *) :
15214 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015216fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015217
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219as_nl='
15220'
15221export as_nl
15222# Printing a long string crashes Solaris 7 /usr/bin/printf.
15223as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15224as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15225as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15226# Prefer a ksh shell builtin over an external printf program on Solaris,
15227# but without wasting forks for bash or zsh.
15228if test -z "$BASH_VERSION$ZSH_VERSION" \
15229 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15230 as_echo='print -r --'
15231 as_echo_n='print -rn --'
15232elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15233 as_echo='printf %s\n'
15234 as_echo_n='printf %s'
15235else
15236 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15237 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15238 as_echo_n='/usr/ucb/echo -n'
15239 else
15240 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15241 as_echo_n_body='eval
15242 arg=$1;
15243 case $arg in #(
15244 *"$as_nl"*)
15245 expr "X$arg" : "X\\(.*\\)$as_nl";
15246 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15247 esac;
15248 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15249 '
15250 export as_echo_n_body
15251 as_echo_n='sh -c $as_echo_n_body as_echo'
15252 fi
15253 export as_echo_body
15254 as_echo='sh -c $as_echo_body as_echo'
15255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
15257# The user is always right.
15258if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 PATH_SEPARATOR=:
15260 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15261 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15262 PATH_SEPARATOR=';'
15263 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266
15267# IFS
15268# We need space, tab and new line, in precisely that order. Quoting is
15269# there to prevent editors from complaining about space-tab.
15270# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15271# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272IFS=" "" $as_nl"
15273
15274# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015275as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015276case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277 *[\\/]* ) as_myself=$0 ;;
15278 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015279for as_dir in $PATH
15280do
15281 IFS=$as_save_IFS
15282 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15284 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 ;;
15288esac
15289# We did not find ourselves, most probably we were run as `sh COMMAND'
15290# in which case we are not to be found in the path.
15291if test "x$as_myself" = x; then
15292 as_myself=$0
15293fi
15294if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15296 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297fi
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299# Unset variables that we do not need and which cause bugs (e.g. in
15300# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15301# suppresses any "Segmentation fault" message there. '((' could
15302# trigger a bug in pdksh 5.2.14.
15303for as_var in BASH_ENV ENV MAIL MAILPATH
15304do eval test x\${$as_var+set} = xset \
15305 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306done
15307PS1='$ '
15308PS2='> '
15309PS4='+ '
15310
15311# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015312LC_ALL=C
15313export LC_ALL
15314LANGUAGE=C
15315export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317# CDPATH.
15318(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15319
15320
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015321# as_fn_error STATUS ERROR [LINENO LOG_FD]
15322# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015323# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15324# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015325# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015326as_fn_error ()
15327{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015328 as_status=$1; test $as_status -eq 0 && as_status=1
15329 if test "$4"; then
15330 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15331 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015333 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 as_fn_exit $as_status
15335} # as_fn_error
15336
15337
15338# as_fn_set_status STATUS
15339# -----------------------
15340# Set $? to STATUS, without forking.
15341as_fn_set_status ()
15342{
15343 return $1
15344} # as_fn_set_status
15345
15346# as_fn_exit STATUS
15347# -----------------
15348# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15349as_fn_exit ()
15350{
15351 set +e
15352 as_fn_set_status $1
15353 exit $1
15354} # as_fn_exit
15355
15356# as_fn_unset VAR
15357# ---------------
15358# Portably unset VAR.
15359as_fn_unset ()
15360{
15361 { eval $1=; unset $1;}
15362}
15363as_unset=as_fn_unset
15364# as_fn_append VAR VALUE
15365# ----------------------
15366# Append the text in VALUE to the end of the definition contained in VAR. Take
15367# advantage of any shell optimizations that allow amortized linear growth over
15368# repeated appends, instead of the typical quadratic growth present in naive
15369# implementations.
15370if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15371 eval 'as_fn_append ()
15372 {
15373 eval $1+=\$2
15374 }'
15375else
15376 as_fn_append ()
15377 {
15378 eval $1=\$$1\$2
15379 }
15380fi # as_fn_append
15381
15382# as_fn_arith ARG...
15383# ------------------
15384# Perform arithmetic evaluation on the ARGs, and store the result in the
15385# global $as_val. Take advantage of shells that can avoid forks. The arguments
15386# must be portable across $(()) and expr.
15387if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15388 eval 'as_fn_arith ()
15389 {
15390 as_val=$(( $* ))
15391 }'
15392else
15393 as_fn_arith ()
15394 {
15395 as_val=`expr "$@" || test $? -eq 1`
15396 }
15397fi # as_fn_arith
15398
15399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400if expr a : '\(a\)' >/dev/null 2>&1 &&
15401 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15402 as_expr=expr
15403else
15404 as_expr=false
15405fi
15406
15407if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15408 as_basename=basename
15409else
15410 as_basename=false
15411fi
15412
Matthias Kloseb9621712010-04-24 17:59:49 +000015413if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15414 as_dirname=dirname
15415else
15416 as_dirname=false
15417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419as_me=`$as_basename -- "$0" ||
15420$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15421 X"$0" : 'X\(//\)$' \| \
15422 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015423$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424 sed '/^.*\/\([^/][^/]*\)\/*$/{
15425 s//\1/
15426 q
15427 }
15428 /^X\/\(\/\/\)$/{
15429 s//\1/
15430 q
15431 }
15432 /^X\/\(\/\).*/{
15433 s//\1/
15434 q
15435 }
15436 s/.*/./; q'`
15437
Matthias Kloseb9621712010-04-24 17:59:49 +000015438# Avoid depending upon Character Ranges.
15439as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15440as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15441as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15442as_cr_digits='0123456789'
15443as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444
15445ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015446case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 xy) ECHO_C='\c';;
15451 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15452 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453 esac;;
15454*)
15455 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015457
Martin v. Löwis11437992002-04-12 09:54:03 +000015458rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459if test -d conf$$.dir; then
15460 rm -f conf$$.dir/conf$$.file
15461else
15462 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015465if (echo >conf$$.file) 2>/dev/null; then
15466 if ln -s conf$$.file conf$$ 2>/dev/null; then
15467 as_ln_s='ln -s'
15468 # ... but there are two gotchas:
15469 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15470 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015471 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015473 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 elif ln conf$$.file conf$$ 2>/dev/null; then
15475 as_ln_s=ln
15476 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015477 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015479else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015480 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15483rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485
15486# as_fn_mkdir_p
15487# -------------
15488# Create "$as_dir" as a directory, including parents if necessary.
15489as_fn_mkdir_p ()
15490{
15491
15492 case $as_dir in #(
15493 -*) as_dir=./$as_dir;;
15494 esac
15495 test -d "$as_dir" || eval $as_mkdir_p || {
15496 as_dirs=
15497 while :; do
15498 case $as_dir in #(
15499 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15500 *) as_qdir=$as_dir;;
15501 esac
15502 as_dirs="'$as_qdir' $as_dirs"
15503 as_dir=`$as_dirname -- "$as_dir" ||
15504$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15505 X"$as_dir" : 'X\(//\)[^/]' \| \
15506 X"$as_dir" : 'X\(//\)$' \| \
15507 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15508$as_echo X"$as_dir" |
15509 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15510 s//\1/
15511 q
15512 }
15513 /^X\(\/\/\)[^/].*/{
15514 s//\1/
15515 q
15516 }
15517 /^X\(\/\/\)$/{
15518 s//\1/
15519 q
15520 }
15521 /^X\(\/\).*/{
15522 s//\1/
15523 q
15524 }
15525 s/.*/./; q'`
15526 test -d "$as_dir" && break
15527 done
15528 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015529 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015530
15531
15532} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015533if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015535else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015536 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015537 as_mkdir_p=false
15538fi
15539
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015540if test -x / >/dev/null 2>&1; then
15541 as_test_x='test -x'
15542else
15543 if ls -dL / >/dev/null 2>&1; then
15544 as_ls_L_option=L
15545 else
15546 as_ls_L_option=
15547 fi
15548 as_test_x='
15549 eval sh -c '\''
15550 if test -d "$1"; then
15551 test -d "$1/.";
15552 else
15553 case $1 in #(
15554 -*)set "./$1";;
15555 esac;
15556 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15557 ???[sx]*):;;*)false;;esac;fi
15558 '\'' sh
15559 '
15560fi
15561as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
15563# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015564as_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 +000015565
15566# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
15569
Martin v. Löwis11437992002-04-12 09:54:03 +000015570exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015571## ----------------------------------- ##
15572## Main body of $CONFIG_STATUS script. ##
15573## ----------------------------------- ##
15574_ASEOF
15575test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15578# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015579# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580# values after options handling.
15581ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015582This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015583generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
15585 CONFIG_FILES = $CONFIG_FILES
15586 CONFIG_HEADERS = $CONFIG_HEADERS
15587 CONFIG_LINKS = $CONFIG_LINKS
15588 CONFIG_COMMANDS = $CONFIG_COMMANDS
15589 $ $0 $@
15590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591on `(hostname || uname -n) 2>/dev/null | sed 1q`
15592"
15593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594_ACEOF
15595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596case $ac_config_files in *"
15597"*) set x $ac_config_files; shift; ac_config_files=$*;;
15598esac
15599
15600case $ac_config_headers in *"
15601"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15602esac
15603
15604
15605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015607config_files="$ac_config_files"
15608config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
Matthias Kloseb9621712010-04-24 17:59:49 +000015612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015613ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015614\`$as_me' instantiates files and other configuration actions
15615from templates according to the current configuration. Unless the files
15616and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015621 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 --config print configuration, then exit
15623 -q, --quiet, --silent
15624 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 -d, --debug don't remove temporary files
15626 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 --file=FILE[:TEMPLATE]
15628 instantiate the configuration file FILE
15629 --header=FILE[:TEMPLATE]
15630 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
15632Configuration files:
15633$config_files
15634
15635Configuration headers:
15636$config_headers
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15642ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015643ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015644python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015645configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015648Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015649This config.status script is free software; the Free Software Foundation
15650gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651
15652ac_pwd='$ac_pwd'
15653srcdir='$srcdir'
15654INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015655MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015656test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15660# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015661ac_need_defaults=:
15662while test $# != 0
15663do
15664 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015665 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15667 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015668 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015670 --*=)
15671 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15672 ac_optarg=
15673 ac_shift=:
15674 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015676 ac_option=$1
15677 ac_optarg=$2
15678 ac_shift=shift
15679 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 esac
15681
Skip Montanaro6dead952003-09-25 14:50:04 +000015682 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015684 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15685 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015687 $as_echo "$ac_cs_version"; exit ;;
15688 --config | --confi | --conf | --con | --co | --c )
15689 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 debug=: ;;
15692 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015693 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 case $ac_optarg in
15695 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015696 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 esac
15698 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 ac_need_defaults=false;;
15700 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015701 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 case $ac_optarg in
15703 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15704 esac
15705 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707 --he | --h)
15708 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015709 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015710Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015713 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15714 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15715 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015716
15717 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015718 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015719Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
15724 esac
15725 shift
15726done
15727
Skip Montanaro6dead952003-09-25 14:50:04 +000015728ac_configure_extra_args=
15729
15730if $ac_cs_silent; then
15731 exec 6>/dev/null
15732 ac_configure_extra_args="$ac_configure_extra_args --silent"
15733fi
15734
15735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015737if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015738 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015739 shift
15740 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15741 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015744fi
15745
Martin v. Löwis11437992002-04-12 09:54:03 +000015746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748exec 5>>config.log
15749{
15750 echo
15751 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15752## Running $as_me. ##
15753_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762
15763# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015764for ac_config_target in $ac_config_targets
15765do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766 case $ac_config_target in
15767 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15768 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15769 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015770 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15771 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15773 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015774 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015775 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776
Victor Stinnere0be4232011-10-25 13:06:09 +020015777 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 esac
15779done
15780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782# If the user did not use the arguments to specify the items to instantiate,
15783# then the envvar interface is used. Set only those that are not.
15784# We use the long form for the default assignment because of an extremely
15785# bizarre bug on SunOS 4.1.3.
15786if $ac_need_defaults; then
15787 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15788 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15789fi
15790
Skip Montanaro6dead952003-09-25 14:50:04 +000015791# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015793# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794# Hook for its removal unless debugging.
15795# Note that there is a small window in which the directory will not be cleaned:
15796# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015797$debug ||
15798{
Victor Stinnere0be4232011-10-25 13:06:09 +020015799 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015801 : "${ac_tmp:=$tmp}"
15802 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015805}
Martin v. Löwis11437992002-04-12 09:54:03 +000015806# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015810 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015811} ||
15812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813 tmp=./conf$$-$RANDOM
15814 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015815} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015816ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818# Set up the scripts for CONFIG_FILES section.
15819# No need to generate them if there are no CONFIG_FILES.
15820# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823
15824ac_cr=`echo X | tr X '\015'`
15825# On cygwin, bash can eat \r inside `` if the user requested igncr.
15826# But we know of no other shell where ac_cr would be empty at this
15827# point, so we can use a bashism as a fallback.
15828if test "x$ac_cr" = x; then
15829 eval ac_cr=\$\'\\r\'
15830fi
15831ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15832if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015833 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015834else
15835 ac_cs_awk_cr=$ac_cr
15836fi
15837
Victor Stinnere0be4232011-10-25 13:06:09 +020015838echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
15840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842{
15843 echo "cat >conf$$subs.awk <<_ACEOF" &&
15844 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15845 echo "_ACEOF"
15846} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015847 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15848ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849ac_delim='%!_!# '
15850for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015852 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15855 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856 break
15857 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015858 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859 else
15860 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862done
Matthias Kloseb9621712010-04-24 17:59:49 +000015863rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015866cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015868sed -n '
15869h
15870s/^/S["/; s/!.*/"]=/
15871p
15872g
15873s/^[^!]*!//
15874:repl
15875t repl
15876s/'"$ac_delim"'$//
15877t delim
15878:nl
15879h
15880s/\(.\{148\}\)..*/\1/
15881t more1
15882s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15883p
15884n
15885b repl
15886:more1
15887s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15888p
15889g
15890s/.\{148\}//
15891t nl
15892:delim
15893h
15894s/\(.\{148\}\)..*/\1/
15895t more2
15896s/["\\]/\\&/g; s/^/"/; s/$/"/
15897p
15898b
15899:more2
15900s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15901p
15902g
15903s/.\{148\}//
15904t delim
15905' <conf$$subs.awk | sed '
15906/^[^""]/{
15907 N
15908 s/\n//
15909}
15910' >>$CONFIG_STATUS || ac_write_fail=1
15911rm -f conf$$subs.awk
15912cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15913_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015914cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 for (key in S) S_is_set[key] = 1
15916 FS = ""
15917
15918}
15919{
15920 line = $ 0
15921 nfields = split(line, field, "@")
15922 substed = 0
15923 len = length(field[1])
15924 for (i = 2; i < nfields; i++) {
15925 key = field[i]
15926 keylen = length(key)
15927 if (S_is_set[key]) {
15928 value = S[key]
15929 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15930 len += length(value) + length(field[++i])
15931 substed = 1
15932 } else
15933 len += 1 + keylen
15934 }
15935
15936 print line
15937}
15938
15939_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15942if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15943 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15944else
15945 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015946fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015947 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015948_ACEOF
15949
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015950# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15951# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015952# trailing colons and then remove the whole line if VPATH becomes empty
15953# (actually we leave an empty line to preserve line numbers).
15954if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015955 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15956h
15957s///
15958s/^/:/
15959s/[ ]*$/:/
15960s/:\$(srcdir):/:/g
15961s/:\${srcdir}:/:/g
15962s/:@srcdir@:/:/g
15963s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015964s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015965x
15966s/\(=[ ]*\).*/\1/
15967G
15968s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969s/^[^=]*=[ ]*$//
15970}'
15971fi
15972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015974fi # test -n "$CONFIG_FILES"
15975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976# Set up the scripts for CONFIG_HEADERS section.
15977# No need to generate them if there are no CONFIG_HEADERS.
15978# This happens for instance with `./config.status Makefile'.
15979if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015980cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015981BEGIN {
15982_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984# Transform confdefs.h into an awk script `defines.awk', embedded as
15985# here-document in config.status, that substitutes the proper values into
15986# config.h.in to produce config.h.
15987
15988# Create a delimiter string that does not exist in confdefs.h, to ease
15989# handling of long lines.
15990ac_delim='%!_!# '
15991for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015992 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15993 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 break
15995 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015996 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 else
15998 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15999 fi
16000done
16001
16002# For the awk script, D is an array of macro values keyed by name,
16003# likewise P contains macro parameters if any. Preserve backslash
16004# newline sequences.
16005
16006ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16007sed -n '
16008s/.\{148\}/&'"$ac_delim"'/g
16009t rset
16010:rset
16011s/^[ ]*#[ ]*define[ ][ ]*/ /
16012t def
16013d
16014:def
16015s/\\$//
16016t bsnl
16017s/["\\]/\\&/g
16018s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16019D["\1"]=" \3"/p
16020s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16021d
16022:bsnl
16023s/["\\]/\\&/g
16024s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16025D["\1"]=" \3\\\\\\n"\\/p
16026t cont
16027s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16028t cont
16029d
16030:cont
16031n
16032s/.\{148\}/&'"$ac_delim"'/g
16033t clear
16034:clear
16035s/\\$//
16036t bsnlc
16037s/["\\]/\\&/g; s/^/"/; s/$/"/p
16038d
16039:bsnlc
16040s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16041b cont
16042' <confdefs.h | sed '
16043s/'"$ac_delim"'/"\\\
16044"/g' >>$CONFIG_STATUS || ac_write_fail=1
16045
16046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16047 for (key in D) D_is_set[key] = 1
16048 FS = ""
16049}
16050/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16051 line = \$ 0
16052 split(line, arg, " ")
16053 if (arg[1] == "#") {
16054 defundef = arg[2]
16055 mac1 = arg[3]
16056 } else {
16057 defundef = substr(arg[1], 2)
16058 mac1 = arg[2]
16059 }
16060 split(mac1, mac2, "(") #)
16061 macro = mac2[1]
16062 prefix = substr(line, 1, index(line, defundef) - 1)
16063 if (D_is_set[macro]) {
16064 # Preserve the white space surrounding the "#".
16065 print prefix "define", macro P[macro] D[macro]
16066 next
16067 } else {
16068 # Replace #undef with comments. This is necessary, for example,
16069 # in the case of _POSIX_SOURCE, which is predefined and required
16070 # on some systems where configure will not decide to define it.
16071 if (defundef == "undef") {
16072 print "/*", prefix defundef, macro, "*/"
16073 next
16074 }
16075 }
16076}
16077{ print }
16078_ACAWK
16079_ACEOF
16080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016081 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016082fi # test -n "$CONFIG_HEADERS"
16083
16084
16085eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16086shift
16087for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088do
16089 case $ac_tag in
16090 :[FHLC]) ac_mode=$ac_tag; continue;;
16091 esac
16092 case $ac_mode$ac_tag in
16093 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016094 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 :[FH]-) ac_tag=-:-;;
16096 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16097 esac
16098 ac_save_IFS=$IFS
16099 IFS=:
16100 set x $ac_tag
16101 IFS=$ac_save_IFS
16102 shift
16103 ac_file=$1
16104 shift
16105
16106 case $ac_mode in
16107 :L) ac_source=$1;;
16108 :[FH])
16109 ac_file_inputs=
16110 for ac_f
16111 do
16112 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016113 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114 *) # Look for the file first in the build tree, then in the source tree
16115 # (if the path is not absolute). The absolute path cannot be DOS-style,
16116 # because $ac_f cannot contain `:'.
16117 test -f "$ac_f" ||
16118 case $ac_f in
16119 [\\/$]*) false;;
16120 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16121 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016122 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16125 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126 done
16127
16128 # Let's still pretend it is `configure' which instantiates (i.e., don't
16129 # use $as_me), people would be surprised to read:
16130 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 configure_input='Generated from '`
16132 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16133 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134 if test x"$ac_file" != x-; then
16135 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16137$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 # Neutralize special characters interpreted by sed in replacement strings.
16140 case $configure_input in #(
16141 *\&* | *\|* | *\\* )
16142 ac_sed_conf_input=`$as_echo "$configure_input" |
16143 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16144 *) ac_sed_conf_input=$configure_input;;
16145 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016146
16147 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016148 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16149 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150 esac
16151 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 esac
16153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016155$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016156 X"$ac_file" : 'X\(//\)[^/]' \| \
16157 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016159$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16161 s//\1/
16162 q
16163 }
16164 /^X\(\/\/\)[^/].*/{
16165 s//\1/
16166 q
16167 }
16168 /^X\(\/\/\)$/{
16169 s//\1/
16170 q
16171 }
16172 /^X\(\/\).*/{
16173 s//\1/
16174 q
16175 }
16176 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_builddir=.
16179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180case "$ac_dir" in
16181.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16182*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186 case $ac_top_builddir_sub in
16187 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16188 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16189 esac ;;
16190esac
16191ac_abs_top_builddir=$ac_pwd
16192ac_abs_builddir=$ac_pwd$ac_dir_suffix
16193# for backward compatibility:
16194ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016195
16196case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 ac_top_srcdir=$ac_top_builddir_sub
16200 ac_abs_top_srcdir=$ac_pwd ;;
16201 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 ac_top_srcdir=$srcdir
16204 ac_abs_top_srcdir=$srcdir ;;
16205 *) # Relative name.
16206 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16207 ac_top_srcdir=$ac_top_build_prefix$srcdir
16208 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016209esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016211
Martin v. Löwis11437992002-04-12 09:54:03 +000016212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 case $ac_mode in
16214 :F)
16215 #
16216 # CONFIG_FILE
16217 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016218
16219 case $INSTALL in
16220 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016223 ac_MKDIR_P=$MKDIR_P
16224 case $MKDIR_P in
16225 [\\/$]* | ?:[\\/]* ) ;;
16226 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16227 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016228_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229
Matthias Kloseb9621712010-04-24 17:59:49 +000016230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231# If the template does not know about datarootdir, expand it.
16232# FIXME: This hack should be removed a few years after 2.60.
16233ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016234ac_sed_dataroot='
16235/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236 p
16237 q
16238}
16239/@datadir@/p
16240/@docdir@/p
16241/@infodir@/p
16242/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016243/@mandir@/p'
16244case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245*datarootdir*) ac_datarootdir_seen=yes;;
16246*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16248$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016250cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 ac_datarootdir_hack='
16252 s&@datadir@&$datadir&g
16253 s&@docdir@&$docdir&g
16254 s&@infodir@&$infodir&g
16255 s&@localedir@&$localedir&g
16256 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258esac
16259_ACEOF
16260
16261# Neutralize VPATH when `$srcdir' = `.'.
16262# Shell code in configure.ac might set extrasub.
16263# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16265ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016266$extrasub
16267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016269:t
16270/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016271s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016273s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274s&@srcdir@&$ac_srcdir&;t t
16275s&@abs_srcdir@&$ac_abs_srcdir&;t t
16276s&@top_srcdir@&$ac_top_srcdir&;t t
16277s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16278s&@builddir@&$ac_builddir&;t t
16279s&@abs_builddir@&$ac_abs_builddir&;t t
16280s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16281s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016282s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016284"
Victor Stinnere0be4232011-10-25 13:06:09 +020016285eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16286 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016289 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16290 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16291 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016292 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016293which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016294$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016295which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016296
Victor Stinnere0be4232011-10-25 13:06:09 +020016297 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016299 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16300 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016301 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016302 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303 ;;
16304 :H)
16305 #
16306 # CONFIG_HEADER
16307 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 {
16310 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016311 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16312 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016313 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016314 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16316$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016319 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016320 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 fi
16322 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016324 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016325 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329
16330 esac
16331
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016332
16333 case $ac_file$ac_mode in
16334 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16335
16336 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337done # for ac_tag
16338
Guido van Rossum627b2d71993-12-24 10:39:16 +000016339
Matthias Kloseb9621712010-04-24 17:59:49 +000016340as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016341_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016342ac_clean_files=$ac_clean_files_save
16343
Matthias Kloseb9621712010-04-24 17:59:49 +000016344test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016345 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016346
Martin v. Löwis11437992002-04-12 09:54:03 +000016347
16348# configure is writing to config.log, and then calls config.status.
16349# config.status does its own redirection, appending to config.log.
16350# Unfortunately, on DOS this fails, as config.log is still kept open
16351# by configure, so config.status won't be able to write to it; its
16352# output is simply discarded. So we exec the FD to /dev/null,
16353# effectively closing config.log, so it can be properly (re)opened and
16354# appended to by config.status. When coming back to configure, we
16355# need to make the FD available again.
16356if test "$no_create" != yes; then
16357 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016358 ac_config_status_args=
16359 test "$silent" = yes &&
16360 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016362 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 exec 5>>config.log
16364 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16365 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016366 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016367fi
16368if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16370$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016371fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016372
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016373
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016374echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016375if test ! -f Modules/Setup
16376then
16377 cp $srcdir/Modules/Setup.dist Modules/Setup
16378fi
16379
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016380echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016381if test ! -f Modules/Setup.local
16382then
16383 echo "# Edit this file for local setup changes" >Modules/Setup.local
16384fi
16385
16386echo "creating Makefile"
16387$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16388 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016389 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016390mv config.c Modules