blob: 3cbeaf34af37db4df55207a622d820c4fd4cfc64 [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.
Trent Nelsona4519a62012-10-16 11:51:08 -04003# Generated by GNU Autoconf 2.69 for python 3.4.
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#
Trent Nelsona4519a62012-10-16 11:51:08 -04008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Trent Nelsona4519a62012-10-16 11:51:08 -0400137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Trent Nelsona4519a62012-10-16 11:51:08 -0400195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Trent Nelsona4519a62012-10-16 11:51:08 -0400241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Trent Nelsona4519a62012-10-16 11:51:08 -0400362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $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 +0000490
Trent Nelsona4519a62012-10-16 11:51:08 -0400491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Trent Nelsona4519a62012-10-16 11:51:08 -0400529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Trent Nelsona4519a62012-10-16 11:51:08 -0400531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Trent Nelsona4519a62012-10-16 11:51:08 -0400535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Trent Nelsona4519a62012-10-16 11:51:08 -0400538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Trent Nelsona4519a62012-10-16 11:51:08 -0400550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_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 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500667HAS_PYTHON
668DISABLE_ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200669ac_ct_READELF
670READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000671ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000673AR
674RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000675USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000676GNULD
677LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000678LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000682PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000683BLDLIBRARY
684DLLLIBRARY
685LDLIBRARY
686LIBRARY
687BUILDEXEEXT
688EGREP
689GREP
690CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200691NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200692ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000693MAINCC
694CXX
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
702EXPORT_MACOSX_DEPLOYMENT_TARGET
703CONFIGURE_MACOSX_DEPLOYMENT_TARGET
704SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200705_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000706MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000707FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000708FRAMEWORKUNIXTOOLSPREFIX
709FRAMEWORKALTINSTALLLAST
710FRAMEWORKALTINSTALLFIRST
711FRAMEWORKINSTALLLAST
712FRAMEWORKINSTALLFIRST
713PYTHONFRAMEWORKINSTALLDIR
714PYTHONFRAMEWORKPREFIX
715PYTHONFRAMEWORKDIR
716PYTHONFRAMEWORKIDENTIFIER
717PYTHONFRAMEWORK
718LIPO_32BIT_FLAGS
719ARCH_RUN_32BIT
720UNIVERSALSDK
721CONFIG_ARGS
722SOVERSION
723VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200724PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100725host_os
726host_vendor
727host_cpu
728host
729build_os
730build_vendor
731build_cpu
732build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500733HAS_HG
734HGBRANCH
735HGTAG
736HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400737BASECPPFLAGS
738BUILDDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758localstatedir
759sharedstatedir
760sysconfdir
761datadir
762datarootdir
763libexecdir
764sbindir
765bindir
766program_transform_name
767prefix
768exec_prefix
769PACKAGE_URL
770PACKAGE_BUGREPORT
771PACKAGE_STRING
772PACKAGE_VERSION
773PACKAGE_TARNAME
774PACKAGE_NAME
775PATH_SEPARATOR
776SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000777ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_user_opts='
779enable_option_checking
780enable_universalsdk
781with_universal_archs
782with_framework_name
783enable_framework
784with_gcc
785with_cxx_main
786with_suffix
787enable_shared
788enable_profiling
789with_pydebug
790with_libs
791with_system_expat
792with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100793with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000794enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000795with_dbmliborder
796with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_threads
798with_thread
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_fpectl
805with_libm
806with_libc
807enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_computed_gotos
809'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810 ac_precious_vars='build_alias
811host_alias
812target_alias
813CC
814CFLAGS
815LDFLAGS
816LIBS
817CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200818CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000822ac_init_help=
823ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000824ac_unrecognized_opts=
825ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826# The variables have the same names as the options, with
827# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000828cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831no_recursion=
832prefix=NONE
833program_prefix=NONE
834program_suffix=NONE
835program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840x_includes=NONE
841x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000842
843# Installation directory options.
844# These are left unexpanded so users can "make install exec_prefix=/foo"
845# and all the variables that are supposed to be based on exec_prefix
846# by default will actually change.
847# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849bindir='${exec_prefix}/bin'
850sbindir='${exec_prefix}/sbin'
851libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852datarootdir='${prefix}/share'
853datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854sysconfdir='${prefix}/etc'
855sharedstatedir='${prefix}/com'
856localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857includedir='${prefix}/include'
858oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
860infodir='${datarootdir}/info'
861htmldir='${docdir}'
862dvidir='${docdir}'
863pdfdir='${docdir}'
864psdir='${docdir}'
865libdir='${exec_prefix}/lib'
866localedir='${datarootdir}/locale'
867mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000872do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 # If the previous option needs an argument, assign it.
874 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 ac_prev=
877 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200881 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
882 *=) ac_optarg= ;;
883 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Accept the important Cygnus configure options, so we can diagnose typos.
887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 case $ac_dashdash$ac_option in
889 --)
890 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892 -bindir | --bindir | --bindi | --bind | --bin | --bi)
893 ac_prev=bindir ;;
894 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896
897 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 -cache-file | --cache-file | --cache-fil | --cache-fi \
903 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
904 ac_prev=cache_file ;;
905 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
906 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 cache_file=$ac_optarg ;;
908
909 --config-cache | -C)
910 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
918 | --dataroo | --dataro | --datar)
919 ac_prev=datarootdir ;;
920 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
921 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
922 datarootdir=$ac_optarg ;;
923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000925 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200928 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt_orig=$ac_useropt
930 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
931 case $ac_user_opts in
932 *"
933"enable_$ac_useropt"
934"*) ;;
935 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
936 ac_unrecognized_sep=', ';;
937 esac
938 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939
940 -docdir | --docdir | --docdi | --doc | --do)
941 ac_prev=docdir ;;
942 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
943 docdir=$ac_optarg ;;
944
945 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
946 ac_prev=dvidir ;;
947 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
948 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
950 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200954 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 ac_useropt_orig=$ac_useropt
956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957 case $ac_user_opts in
958 *"
959"enable_$ac_useropt"
960"*) ;;
961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
962 ac_unrecognized_sep=', ';;
963 esac
964 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
967 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
968 | --exec | --exe | --ex)
969 ac_prev=exec_prefix ;;
970 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
971 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
972 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000976 # Obsolete; use --with-gas.
977 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 -help | --help | --hel | --he | -h)
980 ac_init_help=long ;;
981 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
982 ac_init_help=recursive ;;
983 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
984 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000991 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
992 ac_prev=htmldir ;;
993 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
994 | --ht=*)
995 htmldir=$ac_optarg ;;
996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 -includedir | --includedir | --includedi | --included | --include \
998 | --includ | --inclu | --incl | --inc)
999 ac_prev=includedir ;;
1000 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1001 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
1004 -infodir | --infodir | --infodi | --infod | --info | --inf)
1005 ac_prev=infodir ;;
1006 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
1009 -libdir | --libdir | --libdi | --libd)
1010 ac_prev=libdir ;;
1011 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
1014 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1015 | --libexe | --libex | --libe)
1016 ac_prev=libexecdir ;;
1017 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1018 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001021 -localedir | --localedir | --localedi | --localed | --locale)
1022 ac_prev=localedir ;;
1023 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1024 localedir=$ac_optarg ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 ac_prev=localstatedir ;;
1029 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1034 ac_prev=mandir ;;
1035 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 # Obsolete; use --without-fp.
1040 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 no_create=yes ;;
1045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1047 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1048 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1051 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1052 | --oldin | --oldi | --old | --ol | --o)
1053 ac_prev=oldincludedir ;;
1054 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1055 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1056 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1060 ac_prev=prefix ;;
1061 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1065 | --program-pre | --program-pr | --program-p)
1066 ac_prev=program_prefix ;;
1067 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1068 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1072 | --program-suf | --program-su | --program-s)
1073 ac_prev=program_suffix ;;
1074 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1075 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-transform-name | --program-transform-name \
1079 | --program-transform-nam | --program-transform-na \
1080 | --program-transform-n | --program-transform- \
1081 | --program-transform | --program-transfor \
1082 | --program-transfo | --program-transf \
1083 | --program-trans | --program-tran \
1084 | --progr-tra | --program-tr | --program-t)
1085 ac_prev=program_transform_name ;;
1086 -program-transform-name=* | --program-transform-name=* \
1087 | --program-transform-nam=* | --program-transform-na=* \
1088 | --program-transform-n=* | --program-transform-=* \
1089 | --program-transform=* | --program-transfor=* \
1090 | --program-transfo=* | --program-transf=* \
1091 | --program-trans=* | --program-tran=* \
1092 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001095 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1096 ac_prev=pdfdir ;;
1097 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1098 pdfdir=$ac_optarg ;;
1099
1100 -psdir | --psdir | --psdi | --psd | --ps)
1101 ac_prev=psdir ;;
1102 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1103 psdir=$ac_optarg ;;
1104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1106 | -silent | --silent | --silen | --sile | --sil)
1107 silent=yes ;;
1108
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1110 ac_prev=sbindir ;;
1111 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1112 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114
1115 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1116 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1117 | --sharedst | --shareds | --shared | --share | --shar \
1118 | --sha | --sh)
1119 ac_prev=sharedstatedir ;;
1120 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1121 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1122 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1123 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 -site | --site | --sit)
1127 ac_prev=site ;;
1128 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1132 ac_prev=srcdir ;;
1133 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1137 | --syscon | --sysco | --sysc | --sys | --sy)
1138 ac_prev=sysconfdir ;;
1139 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1140 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1149 verbose=yes ;;
1150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 -version | --version | --versio | --versi | --vers | -V)
1152 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001158 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163"with_$ac_useropt"
1164"*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001174 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 ac_useropt_orig=$ac_useropt
1176 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177 case $ac_user_opts in
1178 *"
1179"with_$ac_useropt"
1180"*) ;;
1181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1182 ac_unrecognized_sep=', ';;
1183 esac
1184 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 --x)
1187 # Obsolete; use --with-x.
1188 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1191 | --x-incl | --x-inc | --x-in | --x-i)
1192 ac_prev=x_includes ;;
1193 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1194 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1198 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1199 ac_prev=x_libraries ;;
1200 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1201 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1205Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 ;;
1207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 *=*)
1209 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1210 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 case $ac_envvar in #(
1212 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 export $ac_envvar ;;
1217
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001218 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001223 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 ;;
1225
1226 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227done
1228
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001231 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232fi
1233
Matthias Kloseb9621712010-04-24 17:59:49 +00001234if test -n "$ac_unrecognized_opts"; then
1235 case $enable_option_checking in
1236 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1239 esac
1240fi
1241
1242# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1244 datadir sysconfdir sharedstatedir localstatedir includedir \
1245 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1246 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 # Remove trailing slashes.
1250 case $ac_val in
1251 */ )
1252 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1253 eval $ac_var=\$ac_val;;
1254 esac
1255 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 [\\/$]* | ?:[\\/]* ) continue;;
1258 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001261done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262
Martin v. Löwis11437992002-04-12 09:54:03 +00001263# There might be people who depend on the old broken behavior: `$host'
1264# used to hold the argument of --host etc.
1265# FIXME: To remove some day.
1266build=$build_alias
1267host=$host_alias
1268target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270# FIXME: To remove some day.
1271if test "x$host_alias" != x; then
1272 if test "x$build_alias" = x; then
1273 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 elif test "x$build_alias" != "x$host_alias"; then
1275 cross_compiling=yes
1276 fi
1277fi
1278
1279ac_tool_prefix=
1280test -n "$host_alias" && ac_tool_prefix=$host_alias-
1281
1282test "$silent" = yes && exec 6>/dev/null
1283
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285ac_pwd=`pwd` && test -n "$ac_pwd" &&
1286ac_ls_di=`ls -di .` &&
1287ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291
1292
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293# Find the source files, if location was not specified.
1294if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001295 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001297 ac_confdir=`$as_dirname -- "$as_myself" ||
1298$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1299 X"$as_myself" : 'X\(//\)[^/]' \| \
1300 X"$as_myself" : 'X\(//\)$' \| \
1301 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1302$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\/\)[^/].*/{
1308 s//\1/
1309 q
1310 }
1311 /^X\(\/\/\)$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\).*/{
1316 s//\1/
1317 q
1318 }
1319 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001320 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322 srcdir=..
1323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324else
1325 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327if test ! -r "$srcdir/$ac_unique_file"; then
1328 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1332ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 pwd)`
1335# When building in place, set srcdir=.
1336if test "$ac_abs_confdir" = "$ac_pwd"; then
1337 srcdir=.
1338fi
1339# Remove unnecessary trailing slashes from srcdir.
1340# Double slashes in file names in object file debugging info
1341# mess up M-x gdb in Emacs.
1342case $srcdir in
1343*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1344esac
1345for ac_var in $ac_precious_vars; do
1346 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1347 eval ac_env_${ac_var}_value=\$${ac_var}
1348 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1349 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1350done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351
Martin v. Löwis11437992002-04-12 09:54:03 +00001352#
1353# Report the --help message.
1354#
1355if test "$ac_init_help" = "long"; then
1356 # Omit some internal or obsolete options to make the list less imposing.
1357 # This message is too long to be a string in the A/UX 3.1 sh.
1358 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001359\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361Usage: $0 [OPTION]... [VAR=VALUE]...
1362
1363To assign environment variables (e.g., CC, CFLAGS...), specify them as
1364VAR=VALUE. See below for descriptions of some of the useful variables.
1365
1366Defaults for the options are specified in brackets.
1367
1368Configuration:
1369 -h, --help display this help and exit
1370 --help=short display options specific to this package
1371 --help=recursive display the short help of all the included packages
1372 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --cache-file=FILE cache test results in FILE [disabled]
1375 -C, --config-cache alias for \`--cache-file=config.cache'
1376 -n, --no-create do not create output files
1377 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1378
Martin v. Löwis11437992002-04-12 09:54:03 +00001379Installation directories:
1380 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384
1385By default, \`make install' will install all the files in
1386\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1387an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1388for instance \`--prefix=\$HOME'.
1389
1390For better control, use the options below.
1391
1392Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 --bindir=DIR user executables [EPREFIX/bin]
1394 --sbindir=DIR system admin executables [EPREFIX/sbin]
1395 --libexecdir=DIR program executables [EPREFIX/libexec]
1396 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1397 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1398 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1399 --libdir=DIR object code libraries [EPREFIX/lib]
1400 --includedir=DIR C header files [PREFIX/include]
1401 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1402 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1403 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1404 --infodir=DIR info documentation [DATAROOTDIR/info]
1405 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1406 --mandir=DIR man documentation [DATAROOTDIR/man]
1407 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1408 --htmldir=DIR html documentation [DOCDIR]
1409 --dvidir=DIR dvi documentation [DOCDIR]
1410 --pdfdir=DIR pdf documentation [DOCDIR]
1411 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001412_ACEOF
1413
1414 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001415
1416System types:
1417 --build=BUILD configure for building on BUILD [guessed]
1418 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001419_ACEOF
1420fi
1421
1422if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001423 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001424 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001425 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 cat <<\_ACEOF
1427
1428Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1431 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001432 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001433 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --enable-framework[=INSTALLDIR]
1435 Build (MacOSX|Darwin) framework
1436 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001437 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001438 --enable-loadable-sqlite-extensions
1439 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --enable-ipv6 Enable ipv6 (with ipv4) support
1441 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001442 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Optional Packages:
1446 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1447 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001448 --with-universal-archs=ARCH
1449 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001450 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001451 --with-framework-name=FRAMEWORK
1452 specify an alternate name of the framework built
1453 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001455 --with-cxx-main=<compiler>
1456 compile main() and link python executable with C++
1457 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with-suffix=.exe set executable suffix
1459 --with-pydebug build with Py_DEBUG defined
1460 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001461 --with-system-expat build pyexpat module using an installed expat
1462 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001463 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001464 --with-system-libmpdec build _decimal module using an installed libmpdec
1465 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001466 --with-dbmliborder=db1:db2:...
1467 order to check db backends for dbm. Valid value is a
1468 colon separated string with the backend names
1469 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with(out)-threads[=DIRECTORY]
1472 disable/enable thread support
1473 --with(out)-thread[=DIRECTORY]
1474 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001476 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001478 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-fpectl enable SIGFPE catching
1480 --with-libm=STRING math library
1481 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001482 --with(out)-computed-gotos
1483 Use computed gotos in evaluation loop (enabled by
1484 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Some influential environment variables:
1487 CC C compiler command
1488 CFLAGS C compiler flags
1489 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1490 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001492 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 CPP C preprocessor
1495
1496Use these variables to override the choices made by `configure' or to help
1497it to find libraries and programs with nonstandard names/locations.
1498
Georg Brandle2e15612009-05-20 18:25:10 +00001499Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001500_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001502fi
1503
1504if test "$ac_init_help" = "recursive"; then
1505 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001507 test -d "$ac_dir" ||
1508 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1509 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_builddir=.
1511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512case "$ac_dir" in
1513.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1514*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001515 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 case $ac_top_builddir_sub in
1519 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1520 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1521 esac ;;
1522esac
1523ac_abs_top_builddir=$ac_pwd
1524ac_abs_builddir=$ac_pwd$ac_dir_suffix
1525# for backward compatibility:
1526ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 ac_top_srcdir=$ac_top_builddir_sub
1532 ac_abs_top_srcdir=$ac_pwd ;;
1533 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 ac_top_srcdir=$srcdir
1536 ac_abs_top_srcdir=$srcdir ;;
1537 *) # Relative name.
1538 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1539 ac_top_srcdir=$ac_top_build_prefix$srcdir
1540 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001541esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 cd "$ac_dir" || { ac_status=$?; continue; }
1545 # Check for guested configure.
1546 if test -f "$ac_srcdir/configure.gnu"; then
1547 echo &&
1548 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1549 elif test -f "$ac_srcdir/configure"; then
1550 echo &&
1551 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 fi || ac_status=$?
1555 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 done
1557fi
1558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001560if $ac_init_version; then
1561 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001562python configure 3.4
Trent Nelsona4519a62012-10-16 11:51:08 -04001563generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
Trent Nelsona4519a62012-10-16 11:51:08 -04001565Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566This configure script is free software; the Free Software Foundation
1567gives unlimited permission to copy, distribute and modify it.
1568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001571
1572## ------------------------ ##
1573## Autoconf initialization. ##
1574## ------------------------ ##
1575
1576# ac_fn_c_try_compile LINENO
1577# --------------------------
1578# Try to compile conftest.$ac_ext, and return whether this succeeded.
1579ac_fn_c_try_compile ()
1580{
1581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582 rm -f conftest.$ac_objext
1583 if { { ac_try="$ac_compile"
1584case "(($ac_try" in
1585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1586 *) ac_try_echo=$ac_try;;
1587esac
1588eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1589$as_echo "$ac_try_echo"; } >&5
1590 (eval "$ac_compile") 2>conftest.err
1591 ac_status=$?
1592 if test -s conftest.err; then
1593 grep -v '^ *+' conftest.err >conftest.er1
1594 cat conftest.er1 >&5
1595 mv -f conftest.er1 conftest.err
1596 fi
1597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598 test $ac_status = 0; } && {
1599 test -z "$ac_c_werror_flag" ||
1600 test ! -s conftest.err
1601 } && test -s conftest.$ac_objext; then :
1602 ac_retval=0
1603else
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=1
1608fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001609 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 as_fn_set_status $ac_retval
1611
1612} # ac_fn_c_try_compile
1613
Matthias Kloseb9621712010-04-24 17:59:49 +00001614# ac_fn_c_try_link LINENO
1615# -----------------------
1616# Try to link conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_link ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext conftest$ac_exeext
1621 if { { ac_try="$ac_link"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_link") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest$ac_exeext && {
1640 test "$cross_compiling" = yes ||
Trent Nelsona4519a62012-10-16 11:51:08 -04001641 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
1650 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1651 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1652 # interfere with the next link command; also delete a directory that is
1653 # left behind by Apple's compiler. We do this before executing the actions.
1654 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_link
1659
Matthias Kloseb9621712010-04-24 17:59:49 +00001660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001681 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
1697# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1698# -------------------------------------------------------
1699# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1700# the include files in INCLUDES and setting the cache variable VAR
1701# accordingly.
1702ac_fn_c_check_header_mongrel ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001705 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001708if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001709 $as_echo_n "(cached) " >&6
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714else
1715 # Is the header compilable?
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1717$as_echo_n "checking $2 usability... " >&6; }
1718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1719/* end confdefs.h. */
1720$4
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_compile "$LINENO"; then :
1724 ac_header_compiler=yes
1725else
1726 ac_header_compiler=no
1727fi
1728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1730$as_echo "$ac_header_compiler" >&6; }
1731
1732# Is the header present?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1734$as_echo_n "checking $2 presence... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_cpp "$LINENO"; then :
1740 ac_header_preproc=yes
1741else
1742 ac_header_preproc=no
1743fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001744rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1746$as_echo "$ac_header_preproc" >&6; }
1747
1748# So? What about this header?
1749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1750 yes:no: )
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1752$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1754$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1755 ;;
1756 no:yes:* )
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1758$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1760$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1762$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1764$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1766$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001767( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001768## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 ) | sed "s/^/$as_me: WARNING: /" >&2
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001785
1786} # ac_fn_c_check_header_mongrel
1787
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 as_fn_set_status $ac_retval
1827
1828} # ac_fn_c_try_run
1829
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_compile
1860
Matthias Kloseb9621712010-04-24 17:59:49 +00001861# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1862# -------------------------------------------
1863# Tests whether TYPE exists after having included INCLUDES, setting cache
1864# variable VAR accordingly.
1865ac_fn_c_check_type ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1869$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 $as_echo_n "(cached) " >&6
1872else
1873 eval "$3=no"
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$4
1877int
1878main ()
1879{
1880if (sizeof ($2))
1881 return 0;
1882 ;
1883 return 0;
1884}
1885_ACEOF
1886if ac_fn_c_try_compile "$LINENO"; then :
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893if (sizeof (($2)))
1894 return 0;
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900
1901else
1902 eval "$3=yes"
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001912
1913} # ac_fn_c_check_type
1914
1915# ac_fn_c_find_uintX_t LINENO BITS VAR
1916# ------------------------------------
1917# Finds an unsigned integer type with width BITS, setting cache variable VAR
1918# accordingly.
1919ac_fn_c_find_uintX_t ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1923$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 # Order is important - never check a type that is potentially smaller
1929 # than half of the expected target width.
1930 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1931 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1933/* end confdefs.h. */
1934$ac_includes_default
1935int
1936main ()
1937{
1938static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Trent Nelsona4519a62012-10-16 11:51:08 -04001939test_array [0] = 0;
1940return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 case $ac_type in #(
1948 uint$2_t) :
1949 eval "$3=yes" ;; #(
1950 *) :
1951 eval "$3=\$ac_type" ;;
1952esac
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001955 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001956
1957else
1958 break
1959fi
1960 done
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967} # ac_fn_c_find_uintX_t
1968
1969# ac_fn_c_find_intX_t LINENO BITS VAR
1970# -----------------------------------
1971# Finds a signed integer type with width BITS, setting cache variable VAR
1972# accordingly.
1973ac_fn_c_find_intX_t ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1977$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001979 $as_echo_n "(cached) " >&6
1980else
1981 eval "$3=no"
1982 # Order is important - never check a type that is potentially smaller
1983 # than half of the expected target width.
1984 for ac_type in int$2_t 'int' 'long int' \
1985 'long long int' 'short int' 'signed char'; do
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001990int
1991main ()
1992{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Trent Nelsona4519a62012-10-16 11:51:08 -04001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002005 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002006int
2007main ()
2008{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002009static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002010 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Trent Nelsona4519a62012-10-16 11:51:08 -04002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019
2020else
2021 case $ac_type in #(
2022 int$2_t) :
2023 eval "$3=yes" ;; #(
2024 *) :
2025 eval "$3=\$ac_type" ;;
2026esac
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029fi
2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002031 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033else
2034 break
2035fi
2036 done
2037fi
2038eval ac_res=\$$3
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2040$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002041 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002042
2043} # ac_fn_c_find_intX_t
2044
2045# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2046# --------------------------------------------
2047# Tries to find the compile-time value of EXPR in a program that includes
2048# INCLUDES, setting VAR accordingly. Returns whether the value could be
2049# computed
2050ac_fn_c_compute_int ()
2051{
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 if test "$cross_compiling" = yes; then
2054 # Depending upon the size, compute the lo and hi bounds.
2055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=0 ac_mid=0
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002079test_array [0] = 0;
2080return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002081
2082 ;
2083 return 0;
2084}
2085_ACEOF
2086if ac_fn_c_try_compile "$LINENO"; then :
2087 ac_hi=$ac_mid; break
2088else
2089 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2090 if test $ac_lo -le $ac_mid; then
2091 ac_lo= ac_hi=
2092 break
2093 fi
2094 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097 done
2098else
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) < 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002106test_array [0] = 0;
2107return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=-1 ac_mid=-1
2115 while :; do
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002123test_array [0] = 0;
2124return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_lo=$ac_mid; break
2132else
2133 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2134 if test $ac_mid -le $ac_hi; then
2135 ac_lo= ac_hi=
2136 break
2137 fi
2138 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 done
2142else
2143 ac_lo= ac_hi=
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148# Binary search between lo and hi bounds.
2149while test "x$ac_lo" != "x$ac_hi"; do
2150 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154int
2155main ()
2156{
2157static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002158test_array [0] = 0;
2159return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_compile "$LINENO"; then :
2166 ac_hi=$ac_mid
2167else
2168 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171done
2172case $ac_lo in #((
2173?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2174'') ac_retval=1 ;;
2175esac
2176 else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180static long int longval () { return $2; }
2181static unsigned long int ulongval () { return $2; }
2182#include <stdio.h>
2183#include <stdlib.h>
2184int
2185main ()
2186{
2187
2188 FILE *f = fopen ("conftest.val", "w");
2189 if (! f)
2190 return 1;
2191 if (($2) < 0)
2192 {
2193 long int i = longval ();
2194 if (i != ($2))
2195 return 1;
2196 fprintf (f, "%ld", i);
2197 }
2198 else
2199 {
2200 unsigned long int i = ulongval ();
2201 if (i != ($2))
2202 return 1;
2203 fprintf (f, "%lu", i);
2204 }
2205 /* Do not output a trailing newline, as this causes \r\n confusion
2206 on some platforms. */
2207 return ferror (f) || fclose (f) != 0;
2208
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_run "$LINENO"; then :
2214 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2215else
2216 ac_retval=1
2217fi
2218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2219 conftest.$ac_objext conftest.beam conftest.$ac_ext
2220rm -f conftest.val
2221
2222 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224 as_fn_set_status $ac_retval
2225
2226} # ac_fn_c_compute_int
2227
2228# ac_fn_c_check_func LINENO FUNC VAR
2229# ----------------------------------
2230# Tests whether FUNC exists, setting the cache variable VAR accordingly
2231ac_fn_c_check_func ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2235$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002236if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 $as_echo_n "(cached) " >&6
2238else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2242 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2243#define $2 innocuous_$2
2244
2245/* System header to define __stub macros and hopefully few prototypes,
2246 which can conflict with char $2 (); below.
2247 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2248 <limits.h> exists even on freestanding compilers. */
2249
2250#ifdef __STDC__
2251# include <limits.h>
2252#else
2253# include <assert.h>
2254#endif
2255
2256#undef $2
2257
2258/* Override any GCC internal prototype to avoid an error.
2259 Use char because int might match the return type of a GCC
2260 builtin and then its argument prototype would still apply. */
2261#ifdef __cplusplus
2262extern "C"
2263#endif
2264char $2 ();
2265/* The GNU C library defines this for functions which it implements
2266 to always fail with ENOSYS. Some functions are actually named
2267 something starting with __ and the normal name is an alias. */
2268#if defined __stub_$2 || defined __stub___$2
2269choke me
2270#endif
2271
2272int
2273main ()
2274{
2275return $2 ();
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_link "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext \
2286 conftest$ac_exeext conftest.$ac_ext
2287fi
2288eval ac_res=\$$3
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002292
2293} # ac_fn_c_check_func
2294
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
2299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306if eval \${$3+:} false; then :
2307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
2315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
2321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
2337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338
2339} # ac_fn_c_check_decl
2340
Matthias Kloseb9621712010-04-24 17:59:49 +00002341# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342# ----------------------------------------------------
2343# Tries to find if the field MEMBER exists in type AGGR, after including
2344# INCLUDES, setting cache variable VAR accordingly.
2345ac_fn_c_check_member ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002350if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (sizeof ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 eval "$4=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391eval ac_res=\$$4
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002395
2396} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002398This file contains any messages produced by compilers while
2399running configure, to aid debugging if configure makes a mistake.
2400
Georg Brandl08a90122012-09-29 09:34:13 +02002401It was created by python $as_me 3.4, which was
Trent Nelsona4519a62012-10-16 11:51:08 -04002402generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404 $ $0 $@
2405
2406_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002408{
2409cat <<_ASUNAME
2410## --------- ##
2411## Platform. ##
2412## --------- ##
2413
2414hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2415uname -m = `(uname -m) 2>/dev/null || echo unknown`
2416uname -r = `(uname -r) 2>/dev/null || echo unknown`
2417uname -s = `(uname -s) 2>/dev/null || echo unknown`
2418uname -v = `(uname -v) 2>/dev/null || echo unknown`
2419
2420/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2421/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2422
2423/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2424/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2425/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002427/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2428/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2429/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2430
2431_ASUNAME
2432
2433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434for as_dir in $PATH
2435do
2436 IFS=$as_save_IFS
2437 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 $as_echo "PATH: $as_dir"
2439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442} >&5
2443
2444cat >&5 <<_ACEOF
2445
2446
2447## ----------- ##
2448## Core tests. ##
2449## ----------- ##
2450
2451_ACEOF
2452
2453
2454# Keep a trace of the command line.
2455# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002456# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002457# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002458# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002460ac_configure_args0=
2461ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002462ac_must_keep_next=false
2463for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002464do
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 for ac_arg
2466 do
2467 case $ac_arg in
2468 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2469 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2470 | -silent | --silent | --silen | --sile | --sil)
2471 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 esac
2475 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002480 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002482 case $ac_arg in
2483 *=* | --config-cache | -C | -disable-* | --disable-* \
2484 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2485 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2486 | -with-* | --with-* | -without-* | --without-* | --x)
2487 case "$ac_configure_args0 " in
2488 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2489 esac
2490 ;;
2491 -* ) ac_must_keep_next=true ;;
2492 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 ;;
2496 esac
2497 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002498done
Matthias Kloseb9621712010-04-24 17:59:49 +00002499{ ac_configure_args0=; unset ac_configure_args0;}
2500{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502# When interrupted or exit'd, cleanup temporary files, and complete
2503# config.log. We remove comments because anyway the quotes in there
2504# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505# WARNING: Use '\'' to represent an apostrophe within the trap.
2506# 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 +00002507trap 'exit_status=$?
2508 # Save into config.log some information that might help in debugging.
2509 {
2510 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002511
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002513## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517(
2518 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2519 eval ac_val=\$$ac_var
2520 case $ac_val in #(
2521 *${as_nl}*)
2522 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2524$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
2526 case $ac_var in #(
2527 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2529 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac ;;
2531 esac
2532 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2535 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 "s/'\''/'\''\\\\'\'''\''/g;
2538 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2539 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002540 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac |
2544 sort
2545)
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002547
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002549## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 echo
2552 for ac_var in $ac_subst_vars
2553 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 eval ac_val=\$$ac_var
2555 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 done | sort
2560 echo
2561
2562 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002566 echo
2567 for ac_var in $ac_subst_files
2568 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 eval ac_val=\$$ac_var
2570 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002574 done | sort
2575 echo
2576 fi
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002580## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
2585 fi
2586 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 $as_echo "$as_me: caught signal $ac_signal"
2588 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 rm -f core *.core core.conftest.* &&
2591 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002594for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002596done
2597ac_signal=0
2598
2599# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002601
Matthias Kloseb9621712010-04-24 17:59:49 +00002602$as_echo "/* confdefs.h */" > confdefs.h
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604# Predefined preprocessor variables.
2605
2606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_NAME "$PACKAGE_NAME"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_VERSION "$PACKAGE_VERSION"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_STRING "$PACKAGE_STRING"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2624_ACEOF
2625
Matthias Kloseb9621712010-04-24 17:59:49 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_URL "$PACKAGE_URL"
2628_ACEOF
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630
2631# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002632# Prefer an explicitly selected file to automatically selected ones.
2633ac_site_file1=NONE
2634ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002636 # We do not want a PATH search for config.site.
2637 case $CONFIG_SITE in #((
2638 -*) ac_site_file1=./$CONFIG_SITE;;
2639 */*) ac_site_file1=$CONFIG_SITE;;
2640 *) ac_site_file1=./$CONFIG_SITE;;
2641 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 ac_site_file1=$prefix/share/config.site
2644 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645else
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 ac_site_file1=$ac_default_prefix/share/config.site
2647 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002649for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650do
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 test "x$ac_site_file" = xNONE && continue
2652 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2654$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002656 . "$ac_site_file" \
2657 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002660See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661 fi
2662done
2663
2664if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 # Some versions of bash will fail to source /dev/null (special files
2666 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2667 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2669$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2672 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 esac
2674 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675else
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2677$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 >$cache_file
2679fi
2680
2681# Check that the precious variables saved in the cache have kept the same
2682# value.
2683ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2686 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2688 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 case $ac_old_set,$ac_new_set in
2690 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2692$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 +00002693 ac_cache_corrupted=: ;;
2694 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2696$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_cache_corrupted=: ;;
2698 ,);;
2699 *)
2700 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 # differences in whitespace do not lead to failure.
2702 ac_old_val_w=`echo x $ac_old_val`
2703 ac_new_val_w=`echo x $ac_new_val`
2704 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2706$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2707 ac_cache_corrupted=:
2708 else
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2710$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2711 eval $ac_var=\$ac_old_val
2712 fi
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2714$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2716$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 fi;;
2718 esac
2719 # Pass precious variables to config.status.
2720 if test "$ac_new_set" = set; then
2721 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 *) ac_arg=$ac_var=$ac_new_val ;;
2724 esac
2725 case " $ac_configure_args " in
2726 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 esac
2729 fi
2730done
2731if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2735$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002736 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002738## -------------------- ##
2739## Main body of script. ##
2740## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741
Guido van Rossum7f43da71994-08-01 12:15:30 +00002742ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2746ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747
Guido van Rossum627b2d71993-12-24 10:39:16 +00002748
Michael W. Hudson54241132001-12-07 15:38:26 +00002749
Trent Nelson4d4ec652012-10-16 08:51:24 -04002750BUILDDIR="`pwd`"
2751
2752
Trent Nelson56d4c032012-10-16 11:07:31 -04002753if test "$srcdir" != "." -a "$srcdir" != "$BUILDDIR"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002754 # If we're building out-of-tree, we need to make sure the following
2755 # resources get picked up before their $srcdir counterparts.
2756 # Objects/ -> typeslots.inc
2757 # Include/ -> Python-ast.h, graminit.h
2758 # Python/ -> importlib.h
2759 # (A side effect of this is that these resources will automatically be
2760 # regenerated when building out-of-tree, regardless of whether or not
2761 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2762 # off.)
2763 BASECPPFLAGS="-IObjects -IInclude -IPython"
2764else
2765 BASECPPFLAGS=""
2766fi
2767
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768
2769
2770
2771
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002772if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773then
2774# Extract the first word of "hg", so it can be a program name with args.
2775set dummy hg; ac_word=$2
2776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002778if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779 $as_echo_n "(cached) " >&6
2780else
2781 if test -n "$HAS_HG"; then
2782 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2783else
2784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2785for as_dir in $PATH
2786do
2787 IFS=$as_save_IFS
2788 test -z "$as_dir" && as_dir=.
2789 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04002790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791 ac_cv_prog_HAS_HG="found"
2792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2793 break 2
2794 fi
2795done
2796 done
2797IFS=$as_save_IFS
2798
2799 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2800fi
2801fi
2802HAS_HG=$ac_cv_prog_HAS_HG
2803if test -n "$HAS_HG"; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2805$as_echo "$HAS_HG" >&6; }
2806else
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
2809fi
2810
2811
2812else
2813HAS_HG=no-repository
2814fi
2815if test $HAS_HG = found
2816then
2817 HGVERSION="hg id -i \$(srcdir)"
2818 HGTAG="hg id -t \$(srcdir)"
2819 HGBRANCH="hg id -b \$(srcdir)"
2820else
2821 HGVERSION=""
2822 HGTAG=""
2823 HGBRANCH=""
2824fi
2825
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002828
2829
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002830ac_aux_dir=
2831for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2832 if test -f "$ac_dir/install-sh"; then
2833 ac_aux_dir=$ac_dir
2834 ac_install_sh="$ac_aux_dir/install-sh -c"
2835 break
2836 elif test -f "$ac_dir/install.sh"; then
2837 ac_aux_dir=$ac_dir
2838 ac_install_sh="$ac_aux_dir/install.sh -c"
2839 break
2840 elif test -f "$ac_dir/shtool"; then
2841 ac_aux_dir=$ac_dir
2842 ac_install_sh="$ac_aux_dir/shtool install -c"
2843 break
2844 fi
2845done
2846if test -z "$ac_aux_dir"; then
2847 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2848fi
2849
2850# These three variables are undocumented and unsupported,
2851# and are intended to be withdrawn in a future Autoconf release.
2852# They can cause serious problems if a builder's source tree is in a directory
2853# whose full name contains unusual characters.
2854ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2855ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2856ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2857
2858
2859# Make sure we can run config.sub.
2860$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2861 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2862
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2864$as_echo_n "checking build system type... " >&6; }
2865if ${ac_cv_build+:} false; then :
2866 $as_echo_n "(cached) " >&6
2867else
2868 ac_build_alias=$build_alias
2869test "x$ac_build_alias" = x &&
2870 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2871test "x$ac_build_alias" = x &&
2872 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2873ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2874 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2875
2876fi
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2878$as_echo "$ac_cv_build" >&6; }
2879case $ac_cv_build in
2880*-*-*) ;;
2881*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2882esac
2883build=$ac_cv_build
2884ac_save_IFS=$IFS; IFS='-'
2885set x $ac_cv_build
2886shift
2887build_cpu=$1
2888build_vendor=$2
2889shift; shift
2890# Remember, the first character of IFS is used to create $*,
2891# except with old shells:
2892build_os=$*
2893IFS=$ac_save_IFS
2894case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2895
2896
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2898$as_echo_n "checking host system type... " >&6; }
2899if ${ac_cv_host+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901else
2902 if test "x$host_alias" = x; then
2903 ac_cv_host=$ac_cv_build
2904else
2905 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2906 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2907fi
2908
2909fi
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2911$as_echo "$ac_cv_host" >&6; }
2912case $ac_cv_host in
2913*-*-*) ;;
2914*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2915esac
2916host=$ac_cv_host
2917ac_save_IFS=$IFS; IFS='-'
2918set x $ac_cv_host
2919shift
2920host_cpu=$1
2921host_vendor=$2
2922shift; shift
2923# Remember, the first character of IFS is used to create $*,
2924# except with old shells:
2925host_os=$*
2926IFS=$ac_save_IFS
2927case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2928
2929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
2937 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002947 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 +02002948 fi
2949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Benjamin Petersond23f8222009-04-05 19:13:16 +00002955if test "$prefix" != "/"; then
2956 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2957fi
2958
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
2961
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002962# We don't use PACKAGE_ variables, and they cause conflicts
2963# with other autoconf-based packages that include Python.h
2964grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2965rm confdefs.h
2966mv confdefs.h.new confdefs.h
2967
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002968
Georg Brandl08a90122012-09-29 09:34:13 +02002969VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002970
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002971# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002972
2973SOVERSION=1.0
2974
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975# The later defininition of _XOPEN_SOURCE disables certain features
2976# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002979
2980
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2983# them.
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986
2987
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993
2994
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2996# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002999
3000
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3003# them.
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006
3007
3008
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003009define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003011# Arguments passed to configure.
3012
3013CONFIG_ARGS="$ac_configure_args"
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3016$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003018if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 case $enableval in
3021 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # Locate the best usable SDK, see Mac/README.txt for more
3023 # information
3024 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3025 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3028 if test ! -d "${enableval}"
3029 then
3030 enableval=/
3031 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
3035 case $enableval in
3036 no)
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039 ;;
3040 *)
3041 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 if test ! -d "${UNIVERSALSDK}"
3043 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003044 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046 ;;
3047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050else
3051
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057if test -n "${UNIVERSALSDK}"
3058then
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3060$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061else
Matthias Kloseb9621712010-04-24 17:59:49 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003067
3068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
3076 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3091$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
3094else
3095
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003098
3099fi
3100
3101
3102
3103
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104
3105# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003107 withval=$with_framework_name;
3108 PYTHONFRAMEWORK=${withval}
3109 PYTHONFRAMEWORKDIR=${withval}.framework
3110 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3111
3112else
3113
3114 PYTHONFRAMEWORK=Python
3115 PYTHONFRAMEWORKDIR=Python.framework
3116 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3117
3118fi
3119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003123 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003124 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003125 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 esac
3127 case $enableval in
3128 no)
3129 PYTHONFRAMEWORK=
3130 PYTHONFRAMEWORKDIR=no-framework
3131 PYTHONFRAMEWORKPREFIX=
3132 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST=
3134 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003135 FRAMEWORKALTINSTALLFIRST=
3136 FRAMEWORKALTINSTALLLAST=
3137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 if test "x${prefix}" = "xNONE" ; then
3154 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 else
3157 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3158 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
3160 case "${enableval}" in
3161 /System*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 if test "${prefix}" = "NONE" ; then
3164 # See below
3165 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3166 fi
3167 ;;
3168
3169 /Library*)
3170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3171 ;;
3172
3173 */Library/Frameworks)
3174 MDIR="`dirname "${enableval}"`"
3175 MDIR="`dirname "${MDIR}"`"
3176 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3177
3178 if test "${prefix}" = "NONE"; then
3179 # User hasn't specified the
3180 # --prefix option, but wants to install
3181 # the framework in a non-default location,
3182 # ensure that the compatibility links get
3183 # installed relative to that prefix as well
3184 # instead of in /usr/local.
3185 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3186 fi
3187 ;;
3188
3189 *)
3190 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3191 ;;
3192 esac
3193
Jack Jansen127e56e2001-09-11 14:41:54 +00003194 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003196 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003202 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3203
3204 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3205
Jack Jansene578a632001-08-15 01:27:14 +00003206 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Guido van Rossum563e7081996-09-10 18:20:48 +00003208else
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003211 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003212 PYTHONFRAMEWORKPREFIX=
3213 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214 FRAMEWORKINSTALLFIRST=
3215 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216 FRAMEWORKALTINSTALLFIRST=
3217 FRAMEWORKALTINSTALLLAST=
3218 if test "x${prefix}" = "xNONE" ; then
3219 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3220 else
3221 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3222 fi
Jack Jansene578a632001-08-15 01:27:14 +00003223 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226fi
3227
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
3229
Michael W. Hudson54241132001-12-07 15:38:26 +00003230
3231
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003235
3236
3237
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003238
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
3252 # ac_sys_system and ac_sys_release are only used for setting
3253 # `define_xopen_source' in the case statement below. For the
3254 # current supported cross builds, this macro is not adjusted.
3255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Guido van Rossum91922671997-10-09 20:24:13 +00003421#
3422# SGI compilers allow the specification of the both the ABI and the
3423# ISA on the command line. Depending on the values of these switches,
3424# different and often incompatable code will be generated.
3425#
3426# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3427# thus supply support for various ABI/ISA combinations. The MACHDEP
3428# variable is also adjusted.
3429#
3430
3431if test ! -z "$SGI_ABI"
3432then
3433 CC="cc $SGI_ABI"
3434 LDFLAGS="$SGI_ABI $LDFLAGS"
3435 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3438$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003439
Jack Jansen6b08a402004-06-03 12:41:45 +00003440# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3441# it may influence the way we can build extensions, so distutils
3442# needs to check it
3443
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003447
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003449
3450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3451# for debug/optimization stuff. BASECFLAGS is for flags that are required
3452# just to get things to compile and link. Users are free to override OPT
3453# when running configure or make. The build should not break if they do.
3454# BASECFLAGS should generally not be messed with, however.
3455
3456# XXX shouldn't some/most/all of this code be merged with the stuff later
3457# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3459$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003462if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003465 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003466 without_gcc=yes;;
3467 yes) CC=gcc
3468 without_gcc=no;;
3469 *) CC=$withval
3470 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003471 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472else
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003474 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003475 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003476 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003477 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003478 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479fi
3480
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3482$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003483
Guido van Rossum8b131c51995-03-09 14:10:13 +00003484# If the user switches compilers, we can't believe the cache
3485if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3486then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003487 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003488(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003489fi
3490
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003491# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3492# when the compiler supports them, but we don't always want -O2, and
3493# we set -g later.
3494if test -z "$CFLAGS"; then
3495 CFLAGS=
3496fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003497
3498if test "$ac_sys_system" = "Darwin"
3499then
3500 # Compiler selection on MacOSX is more complicated than
3501 # AC_PROG_CC can handle, see Mac/README.txt for more
3502 # information
3503 if test -z "${CC}"
3504 then
3505 found_gcc=
3506 found_clang=
3507 as_save_IFS=$IFS; IFS=:
3508 for as_dir in $PATH
3509 do
3510 IFS=$as_save_IFS
3511 if test -x $as_dir/gcc; then
3512 if test -z "${found_gcc}"; then
3513 found_gcc=$as_dir/gcc
3514 fi
3515 fi
3516 if test -x $as_dir/clang; then
3517 if test -z "${found_clang}"; then
3518 found_clang=$as_dir/clang
3519 fi
3520 fi
3521 done
3522 IFS=$as_save_IFS
3523
3524 if test -n "$found_gcc" -a -n "$found_clang"
3525 then
3526 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3527 then
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3529$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3530 CC="$found_clang"
3531 CXX="$found_clang++"
3532 fi
3533
3534
3535 elif test -z "$found_gcc" -a -n "$found_clang"
3536 then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3538$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3539 CC="$found_clang"
3540 CXX="$found_clang++"
3541
3542 elif test -z "$found_gcc" -a -z "$found_clang"
3543 then
3544 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3545 if test -n "${found_clang}"
3546 then
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3548$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3549 CC="${found_clang}"
3550 CXX="`/usr/bin/xcrun -find clang++`"
3551
3552 # else: use default behaviour
3553 fi
3554 fi
3555 fi
3556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003557ac_ext=c
3558ac_cpp='$CPP $CPPFLAGS'
3559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3561ac_compiler_gnu=$ac_cv_c_compiler_gnu
3562if test -n "$ac_tool_prefix"; then
3563 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3564set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003567if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003569else
3570 if test -n "$CC"; then
3571 ac_cv_prog_CC="$CC" # Let the user override the test.
3572else
Martin v. Löwis11437992002-04-12 09:54:03 +00003573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 $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 +00003582 break 2
3583 fi
3584done
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003587
Jack Jansendd19cf82001-12-06 22:36:17 +00003588fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003591if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3593$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003594else
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3596$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003597fi
3598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601if test -z "$ac_cv_prog_CC"; then
3602 ac_ct_CC=$CC
3603 # Extract the first word of "gcc", so it can be a program name with args.
3604set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003607if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
3610 if test -n "$ac_ct_CC"; then
3611 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3612else
3613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $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 +00003622 break 2
3623 fi
3624done
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003627
3628fi
3629fi
3630ac_ct_CC=$ac_cv_prog_ac_ct_CC
3631if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3633$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3636$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 if test "x$ac_ct_CC" = x; then
3640 CC=""
3641 else
3642 case $cross_compiling:$ac_tool_warned in
3643yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646ac_tool_warned=yes ;;
3647esac
3648 CC=$ac_ct_CC
3649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
3651 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003652fi
3653
Jack Jansendd19cf82001-12-06 22:36:17 +00003654if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 if test -n "$ac_tool_prefix"; then
3656 # 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 +00003657set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003660if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003662else
3663 if test -n "$CC"; then
3664 ac_cv_prog_CC="$CC" # Let the user override the test.
3665else
Martin v. Löwis11437992002-04-12 09:54:03 +00003666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683CC=$ac_cv_prog_CC
3684if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3686$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695if test -z "$CC"; then
3696 # Extract the first word of "cc", so it can be a program name with args.
3697set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3699$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003700if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
3703 if test -n "$CC"; then
3704 ac_cv_prog_CC="$CC" # Let the user override the test.
3705else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3708for as_dir in $PATH
3709do
3710 IFS=$as_save_IFS
3711 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3715 ac_prog_rejected=yes
3716 continue
3717 fi
3718 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $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 +00003720 break 2
3721 fi
3722done
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003725
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726if test $ac_prog_rejected = yes; then
3727 # We found a bogon in the path, so make sure we never use it.
3728 set dummy $ac_cv_prog_CC
3729 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 # We chose a different compiler from the bogus one.
3732 # However, it has the same basename, so the bogon will be chosen
3733 # first if we set CC to just the basename; use the full file name.
3734 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003735 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 fi
3737fi
3738fi
3739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3743$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744else
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747fi
3748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751if test -z "$CC"; then
3752 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 do
3755 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003759if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003761else
3762 if test -n "$CC"; then
3763 ac_cv_prog_CC="$CC" # Let the user override the test.
3764else
Martin v. Löwis11437992002-04-12 09:54:03 +00003765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $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 +00003774 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003776done
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
3780fi
3781fi
3782CC=$ac_cv_prog_CC
3783if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3785$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003789fi
3790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 test -n "$CC" && break
3793 done
3794fi
3795if test -z "$CC"; then
3796 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003798do
3799 # Extract the first word of "$ac_prog", so it can be a program name with args.
3800set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3802$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003803if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003805else
3806 if test -n "$ac_ct_CC"; then
3807 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3808else
3809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3810for as_dir in $PATH
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $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 +00003818 break 2
3819 fi
3820done
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
3825fi
3826ac_ct_CC=$ac_cv_prog_ac_ct_CC
3827if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3829$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3832$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 test -n "$ac_ct_CC" && break
3837done
Michael W. Hudson54241132001-12-07 15:38:26 +00003838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 if test "x$ac_ct_CC" = x; then
3840 CC=""
3841 else
3842 case $cross_compiling:$ac_tool_warned in
3843yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846ac_tool_warned=yes ;;
3847esac
3848 CC=$ac_ct_CC
3849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851
3852fi
3853
3854
Matthias Kloseb9621712010-04-24 17:59:49 +00003855test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003857as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003858See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859
3860# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003861$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3862set X $ac_compile
3863ac_compiler=$2
3864for ac_option in --version -v -V -qversion; do
3865 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866case "(($ac_try" in
3867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3868 *) ac_try_echo=$ac_try;;
3869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3871$as_echo "$ac_try_echo"; } >&5
3872 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 if test -s conftest.err; then
3875 sed '10a\
3876... rest of stderr output deleted ...
3877 10q' conftest.err >conftest.er1
3878 cat conftest.er1 >&5
3879 fi
3880 rm -f conftest.er1 conftest.err
3881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }
3883done
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
Matthias Kloseb9621712010-04-24 17:59:49 +00003885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003886/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888int
3889main ()
3890{
3891
3892 ;
3893 return 0;
3894}
3895_ACEOF
3896ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003897ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003898# Try to create an executable without -o first, disregard a.out.
3899# It will help us diagnose broken compilers, and finding out an intuition
3900# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3902$as_echo_n "checking whether the C compiler works... " >&6; }
3903ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3904
3905# The possible output files:
3906ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_rmfiles=
3909for ac_file in $ac_files
3910do
3911 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3914 esac
3915done
3916rm -f $ac_rmfiles
3917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3930# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3931# in a Makefile. We should not override ac_cv_exeext if it was cached,
3932# so that the user can short-circuit this test for compilers unknown to
3933# Autoconf.
3934for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003935do
3936 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003939 ;;
3940 [ab].out )
3941 # We found the default executable, but exeext='' is most
3942 # certainly right.
3943 break;;
3944 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 then :; else
3947 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3948 fi
3949 # We set ac_cv_exeext here because the later test for it is not
3950 # safe: cross compilers may not add the suffix if given an `-o'
3951 # argument, so we may need to know it at that point already.
3952 # Even if this section looks crufty: it has the advantage of
3953 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 break;;
3955 * )
3956 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003957 esac
3958done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959test "$ac_cv_exeext" = no && ac_cv_exeext=
3960
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003961else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 ac_file=''
3963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if test -z "$ac_file"; then :
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966$as_echo "no" >&6; }
3967$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003968sed 's/^/| /' conftest.$ac_ext >&5
3969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003972as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003973See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003974else
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3976$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3979$as_echo_n "checking for C compiler default output file name... " >&6; }
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3981$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3987$as_echo_n "checking for suffix of executables... " >&6; }
3988if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989case "(($ac_try" in
3990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3991 *) ac_try_echo=$ac_try;;
3992esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3994$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003996 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3998 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4000# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4001# work properly (i.e., refer to `conftest.exe'), while it won't with
4002# `rm'.
4003for ac_file in conftest.exe conftest conftest.*; do
4004 test -f "$ac_file" || continue
4005 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4008 break;;
4009 * ) break;;
4010 esac
4011done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012else
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004018rm -f conftest conftest$ac_cv_exeext
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4020$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
4022rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004023EXEEXT=$ac_cv_exeext
4024ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4026/* end confdefs.h. */
4027#include <stdio.h>
4028int
4029main ()
4030{
4031FILE *f = fopen ("conftest.out", "w");
4032 return ferror (f) || fclose (f) != 0;
4033
4034 ;
4035 return 0;
4036}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004038ac_clean_files="$ac_clean_files conftest.out"
4039# Check that the compiler produces executables we can run. If not, either
4040# the compiler is broken, or we cross compile.
4041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4042$as_echo_n "checking whether we are cross compiling... " >&6; }
4043if test "$cross_compiling" != yes; then
4044 { { ac_try="$ac_link"
4045case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_link") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }
4055 if { ac_try='./conftest$ac_cv_exeext'
4056 { { case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
4060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
4062 (eval "$ac_try") 2>&5
4063 ac_status=$?
4064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; }; then
4066 cross_compiling=no
4067 else
4068 if test "$cross_compiling" = maybe; then
4069 cross_compiling=yes
4070 else
4071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004073as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004074If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004075See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 fi
4077 fi
4078fi
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4080$as_echo "$cross_compiling" >&6; }
4081
4082rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4083ac_clean_files=$ac_clean_files_save
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4085$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004086if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo_n "(cached) " >&6
4088else
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090/* end confdefs.h. */
4091
4092int
4093main ()
4094{
4095
4096 ;
4097 return 0;
4098}
4099_ACEOF
4100rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004101if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 for ac_file in conftest.o conftest.obj conftest.*; do
4113 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4117 break;;
4118 esac
4119done
4120else
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004122sed 's/^/| /' conftest.$ac_ext >&5
4123
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004126as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004127See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004128fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004129rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4132$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133OBJEXT=$ac_cv_objext
4134ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4136$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004137if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143int
4144main ()
4145{
4146#ifndef __GNUC__
4147 choke me
4148#endif
4149
4150 ;
4151 return 0;
4152}
4153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004154if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_compiler_gnu=yes
4156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004160ac_cv_c_compiler_gnu=$ac_compiler_gnu
4161
4162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4164$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4165if test $ac_compiler_gnu = yes; then
4166 GCC=yes
4167else
4168 GCC=
4169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004170ac_test_CFLAGS=${CFLAGS+set}
4171ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4173$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004174if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004176else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177 ac_save_c_werror_flag=$ac_c_werror_flag
4178 ac_c_werror_flag=yes
4179 ac_cv_prog_cc_g=no
4180 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004183
Martin v. Löwis11437992002-04-12 09:54:03 +00004184int
4185main ()
4186{
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 CFLAGS=""
4196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197/* end confdefs.h. */
4198
4199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208
Matthias Kloseb9621712010-04-24 17:59:49 +00004209else
4210 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231 ac_c_werror_flag=$ac_save_c_werror_flag
4232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4234$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004235if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004237elif test $ac_cv_prog_cc_g = yes; then
4238 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 CFLAGS="-g -O2"
4240 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242 fi
4243else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004244 if test "$GCC" = yes; then
4245 CFLAGS="-O2"
4246 else
4247 CFLAGS=
4248 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4251$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004252if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004254else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004256ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* end confdefs.h. */
4259#include <stdarg.h>
4260#include <stdio.h>
Trent Nelsona4519a62012-10-16 11:51:08 -04004261struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4263struct buf { int x; };
4264FILE * (*rcsopen) (struct buf *, struct stat *, int);
4265static char *e (p, i)
4266 char **p;
4267 int i;
4268{
4269 return p[i];
4270}
4271static char *f (char * (*g) (char **, int), char **p, ...)
4272{
4273 char *s;
4274 va_list v;
4275 va_start (v,p);
4276 s = g (p, va_arg (v,int));
4277 va_end (v);
4278 return s;
4279}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004280
4281/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4282 function prototypes and stuff, but not '\xHH' hex character constants.
4283 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4286 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004288int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4291 inside strings and character constants. */
4292#define FOO(x) 'x'
4293int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4294
Skip Montanaro6dead952003-09-25 14:50:04 +00004295int test (int i, double x);
4296struct s1 {int (*f) (int a);};
4297struct s2 {int (*f) (double a);};
4298int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4299int argc;
4300char **argv;
4301int
4302main ()
4303{
4304return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4305 ;
4306 return 0;
4307}
4308_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4310 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004311do
4312 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316rm -f core conftest.err conftest.$ac_objext
4317 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004318done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320CC=$ac_save_CC
4321
4322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323# AC_CACHE_VAL
4324case "x$ac_cv_prog_cc_c89" in
4325 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4327$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4330$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004331 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4334$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004335esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004336if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004337
Matthias Kloseb9621712010-04-24 17:59:49 +00004338fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004339
Martin v. Löwis11437992002-04-12 09:54:03 +00004340ac_ext=c
4341ac_cpp='$CPP $CPPFLAGS'
4342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004346
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004347
4348
Matthias Kloseb9621712010-04-24 17:59:49 +00004349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4350$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004355
4356 case $withval in
4357 no) with_cxx_main=no
4358 MAINCC='$(CC)';;
4359 yes) with_cxx_main=yes
4360 MAINCC='$(CXX)';;
4361 *) with_cxx_main=yes
4362 MAINCC=$withval
4363 if test -z "$CXX"
4364 then
4365 CXX=$withval
4366 fi;;
4367 esac
4368else
4369
4370 with_cxx_main=no
4371 MAINCC='$(CC)'
4372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373fi
4374
Matthias Kloseb9621712010-04-24 17:59:49 +00004375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4376$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004377
4378preset_cxx="$CXX"
4379if test -z "$CXX"
4380then
4381 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004382 gcc) if test -n "$ac_tool_prefix"; then
4383 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4384set dummy ${ac_tool_prefix}g++; ac_word=$2
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4386$as_echo_n "checking for $ac_word... " >&6; }
4387if ${ac_cv_path_CXX+:} false; then :
4388 $as_echo_n "(cached) " >&6
4389else
4390 case $CXX in
4391 [\\/]* | ?:[\\/]*)
4392 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4393 ;;
4394 *)
4395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4396for as_dir in notfound
4397do
4398 IFS=$as_save_IFS
4399 test -z "$as_dir" && as_dir=.
4400 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004402 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4404 break 2
4405 fi
4406done
4407 done
4408IFS=$as_save_IFS
4409
4410 ;;
4411esac
4412fi
4413CXX=$ac_cv_path_CXX
4414if test -n "$CXX"; then
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4416$as_echo "$CXX" >&6; }
4417else
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4419$as_echo "no" >&6; }
4420fi
4421
4422
4423fi
4424if test -z "$ac_cv_path_CXX"; then
4425 ac_pt_CXX=$CXX
4426 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004427set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004430if ${ac_cv_path_ac_pt_CXX+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 case $ac_pt_CXX in
4434 [\\/]* | ?:[\\/]*)
4435 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4436 ;;
4437 *)
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in notfound
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453 ;;
4454esac
4455fi
4456ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4457if test -n "$ac_pt_CXX"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4459$as_echo "$ac_pt_CXX" >&6; }
4460else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465 if test "x$ac_pt_CXX" = x; then
4466 CXX="g++"
4467 else
4468 case $cross_compiling:$ac_tool_warned in
4469yes:)
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4472ac_tool_warned=yes ;;
4473esac
4474 CXX=$ac_pt_CXX
4475 fi
4476else
4477 CXX="$ac_cv_path_CXX"
4478fi
4479 ;;
4480 cc) if test -n "$ac_tool_prefix"; then
4481 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4482set dummy ${ac_tool_prefix}c++; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004485if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487else
4488 case $CXX in
4489 [\\/]* | ?:[\\/]*)
4490 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4491 ;;
4492 *)
4493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in notfound
4495do
4496 IFS=$as_save_IFS
4497 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502 break 2
4503 fi
4504done
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004508 ;;
4509esac
4510fi
4511CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004512if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4514$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004515else
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004520
4521fi
4522if test -z "$ac_cv_path_CXX"; then
4523 ac_pt_CXX=$CXX
4524 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004525set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004528if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004531 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533 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 +00004534 ;;
4535 *)
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in notfound
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 break 2
4546 fi
4547done
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004549IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 ;;
4552esac
4553fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004554ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4555if test -n "$ac_pt_CXX"; then
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4557$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004563 if test "x$ac_pt_CXX" = x; then
4564 CXX="c++"
4565 else
4566 case $cross_compiling:$ac_tool_warned in
4567yes:)
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4569$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4570ac_tool_warned=yes ;;
4571esac
4572 CXX=$ac_pt_CXX
4573 fi
4574else
4575 CXX="$ac_cv_path_CXX"
4576fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578 clang|*/clang) if test -n "$ac_tool_prefix"; then
4579 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4580set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4582$as_echo_n "checking for $ac_word... " >&6; }
4583if ${ac_cv_path_CXX+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 case $CXX in
4587 [\\/]* | ?:[\\/]*)
4588 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4589 ;;
4590 *)
4591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4592for as_dir in notfound
4593do
4594 IFS=$as_save_IFS
4595 test -z "$as_dir" && as_dir=.
4596 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004598 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4600 break 2
4601 fi
4602done
4603 done
4604IFS=$as_save_IFS
4605
Ned Deilycbfb9a52012-06-23 16:02:19 -07004606 ;;
4607esac
4608fi
4609CXX=$ac_cv_path_CXX
4610if test -n "$CXX"; then
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4612$as_echo "$CXX" >&6; }
4613else
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615$as_echo "no" >&6; }
4616fi
4617
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004618
4619fi
4620if test -z "$ac_cv_path_CXX"; then
4621 ac_pt_CXX=$CXX
4622 # Extract the first word of "clang++", so it can be a program name with args.
4623set dummy clang++; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_ac_pt_CXX+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628else
4629 case $ac_pt_CXX in
4630 [\\/]* | ?:[\\/]*)
4631 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4632 ;;
4633 *)
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in notfound
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004641 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
4649 ;;
4650esac
4651fi
4652ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4653if test -n "$ac_pt_CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4655$as_echo "$ac_pt_CXX" >&6; }
4656else
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661 if test "x$ac_pt_CXX" = x; then
4662 CXX="clang++"
4663 else
4664 case $cross_compiling:$ac_tool_warned in
4665yes:)
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4668ac_tool_warned=yes ;;
4669esac
4670 CXX=$ac_pt_CXX
4671 fi
4672else
4673 CXX="$ac_cv_path_CXX"
4674fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004675 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676 esac
4677 if test "$CXX" = "notfound"
4678 then
4679 CXX=""
4680 fi
4681fi
4682if test -z "$CXX"
4683then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 if test -n "$ac_tool_prefix"; then
4685 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4686 do
4687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004691if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004692 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693else
4694 if test -n "$CXX"; then
4695 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4696else
4697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706 break 2
4707 fi
4708done
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004710IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004711
4712fi
4713fi
4714CXX=$ac_cv_prog_CXX
4715if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718else
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721fi
4722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724 test -n "$CXX" && break
4725 done
4726fi
4727if test -z "$CXX"; then
4728 ac_ct_CXX=$CXX
4729 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4730do
4731 # Extract the first word of "$ac_prog", so it can be a program name with args.
4732set dummy $ac_prog; ac_word=$2
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
4735if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737else
4738 if test -n "$ac_ct_CXX"; then
4739 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4740else
4741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742for as_dir in $PATH
4743do
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 ac_cv_prog_ac_ct_CXX="$ac_prog"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4751 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 done
4754IFS=$as_save_IFS
4755
4756fi
4757fi
4758ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4759if test -n "$ac_ct_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4761$as_echo "$ac_ct_CXX" >&6; }
4762else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768 test -n "$ac_ct_CXX" && break
4769done
4770
4771 if test "x$ac_ct_CXX" = x; then
4772 CXX="notfound"
4773 else
4774 case $cross_compiling:$ac_tool_warned in
4775yes:)
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778ac_tool_warned=yes ;;
4779esac
4780 CXX=$ac_ct_CXX
4781 fi
4782fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
4784 if test "$CXX" = "notfound"
4785 then
4786 CXX=""
4787 fi
4788fi
4789if test "$preset_cxx" != "$CXX"
4790then
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792
4793 By default, distutils will build C++ extension modules with \"$CXX\".
4794 If this is not intended, then set CXX on the configure command line.
4795 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004796$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
4798 By default, distutils will build C++ extension modules with \"$CXX\".
4799 If this is not intended, then set CXX on the configure command line.
4800 " >&2;}
4801fi
4802
4803
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4805$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4806save_LDFLAGS="$LDFLAGS"
4807LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004808
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4810/* end confdefs.h. */
4811
4812int
4813main ()
4814{
4815
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820if ac_fn_c_try_link "$LINENO"; then :
4821 NO_AS_NEEDED="-Wl,--no-as-needed"
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4823$as_echo "yes" >&6; }
4824else
4825 NO_AS_NEEDED=""
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4827$as_echo "no" >&6; }
4828fi
4829rm -f core conftest.err conftest.$ac_objext \
4830 conftest$ac_exeext conftest.$ac_ext
4831LDFLAGS="$save_LDFLAGS"
4832
4833
4834
4835# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004836ac_ext=c
4837ac_cpp='$CPP $CPPFLAGS'
4838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4840ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4842$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004843# On Suns, sometimes $CPP names a directory.
4844if test -n "$CPP" && test -d "$CPP"; then
4845 CPP=
4846fi
4847if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004848 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004850else
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Double quotes because CPP needs to be expanded
4852 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4853 do
4854 ac_preproc_ok=false
4855for ac_c_preproc_warn_flag in '' yes
4856do
4857 # Use a header file that comes with gcc, so configuring glibc
4858 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004859 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4860 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004861 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004864/* end confdefs.h. */
4865#ifdef __STDC__
4866# include <limits.h>
4867#else
4868# include <assert.h>
4869#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004870 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004872if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004873
Matthias Kloseb9621712010-04-24 17:59:49 +00004874else
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 # Broken: fails on valid input.
4876continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004877fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004878rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004880 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004884#include <ac_nonexistent.h>
4885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004886if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # Broken: success on invalid input.
4888continue
4889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 # Passes both tests.
4891ac_preproc_ok=:
4892break
4893fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004894rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004895
4896done
4897# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004898rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 break
4901fi
4902
4903 done
4904 ac_cv_prog_CPP=$CPP
4905
4906fi
4907 CPP=$ac_cv_prog_CPP
4908else
4909 ac_cv_prog_CPP=$CPP
4910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4912$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004913ac_preproc_ok=false
4914for ac_c_preproc_warn_flag in '' yes
4915do
4916 # Use a header file that comes with gcc, so configuring glibc
4917 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004918 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4919 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004920 # On the NeXT, cc -E runs the code through the compiler's parser,
4921 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004923/* end confdefs.h. */
4924#ifdef __STDC__
4925# include <limits.h>
4926#else
4927# include <assert.h>
4928#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004929 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004931if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004932
Matthias Kloseb9621712010-04-24 17:59:49 +00004933else
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 # Broken: fails on valid input.
4935continue
4936fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004937rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004939 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004943#include <ac_nonexistent.h>
4944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Broken: success on invalid input.
4947continue
4948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 # Passes both tests.
4950ac_preproc_ok=:
4951break
4952fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004953rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004954
4955done
4956# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004957rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004958if $ac_preproc_ok; then :
4959
Martin v. Löwis11437992002-04-12 09:54:03 +00004960else
Matthias Kloseb9621712010-04-24 17:59:49 +00004961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004963as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004964See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004965fi
4966
4967ac_ext=c
4968ac_cpp='$CPP $CPPFLAGS'
4969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4971ac_compiler_gnu=$ac_cv_c_compiler_gnu
4972
4973
Matthias Kloseb9621712010-04-24 17:59:49 +00004974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4975$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004976if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004978else
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 # Loop through the user's path and test for each of PROGNAME-LIST
4982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004983for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4984do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 for ac_prog in grep ggrep; do
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Trent Nelsona4519a62012-10-16 11:51:08 -04004990 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004991# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004992 # Check for GNU $ac_path_GREP
4993case `"$ac_path_GREP" --version 2>&1` in
4994*GNU*)
4995 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4996*)
4997 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 while :
5000 do
5001 cat "conftest.in" "conftest.in" >"conftest.tmp"
5002 mv "conftest.tmp" "conftest.in"
5003 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5006 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005008 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5009 # Best one so far, save it but keep looking for a better one
5010 ac_cv_path_GREP="$ac_path_GREP"
5011 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005012 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 # 10*(2^10) chars as input seems more than enough
5014 test $ac_count -gt 10 && break
5015 done
5016 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5017esac
5018
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $ac_path_GREP_found && break 3
5020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005025 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 +00005026 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005027else
5028 ac_cv_path_GREP=$GREP
5029fi
5030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5033$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034 GREP="$ac_cv_path_GREP"
5035
5036
Matthias Kloseb9621712010-04-24 17:59:49 +00005037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5038$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005039if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041else
5042 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5043 then ac_cv_path_EGREP="$GREP -E"
5044 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 # Loop through the user's path and test for each of PROGNAME-LIST
5048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 for ac_prog in egrep; do
5054 for ac_exec_ext in '' $ac_executable_extensions; do
5055 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Trent Nelsona4519a62012-10-16 11:51:08 -04005056 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005057# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005058 # Check for GNU $ac_path_EGREP
5059case `"$ac_path_EGREP" --version 2>&1` in
5060*GNU*)
5061 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5062*)
5063 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 while :
5066 do
5067 cat "conftest.in" "conftest.in" >"conftest.tmp"
5068 mv "conftest.tmp" "conftest.in"
5069 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5072 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005074 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5075 # Best one so far, save it but keep looking for a better one
5076 ac_cv_path_EGREP="$ac_path_EGREP"
5077 ac_path_EGREP_max=$ac_count
5078 fi
5079 # 10*(2^10) chars as input seems more than enough
5080 test $ac_count -gt 10 && break
5081 done
5082 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5083esac
5084
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $ac_path_EGREP_found && break 3
5086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005091 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 +00005092 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093else
5094 ac_cv_path_EGREP=$EGREP
5095fi
5096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097 fi
5098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5100$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005102
5103
Matthias Kloseb9621712010-04-24 17:59:49 +00005104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5105$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005106if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo_n "(cached) " >&6
5108else
5109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005110/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005111#include <stdlib.h>
5112#include <stdarg.h>
5113#include <string.h>
5114#include <float.h>
5115
5116int
5117main ()
5118{
5119
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124if ac_fn_c_try_compile "$LINENO"; then :
5125 ac_cv_header_stdc=yes
5126else
5127 ac_cv_header_stdc=no
5128fi
5129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5130
5131if test $ac_cv_header_stdc = yes; then
5132 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5134/* end confdefs.h. */
5135#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005136
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005137_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005141else
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005144rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145
Matthias Kloseb9621712010-04-24 17:59:49 +00005146fi
5147
5148if test $ac_cv_header_stdc = yes; then
5149 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5151/* end confdefs.h. */
5152#include <stdlib.h>
5153
5154_ACEOF
5155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5156 $EGREP "free" >/dev/null 2>&1; then :
5157
5158else
5159 ac_cv_header_stdc=no
5160fi
5161rm -f conftest*
5162
5163fi
5164
5165if test $ac_cv_header_stdc = yes; then
5166 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5167 if test "$cross_compiling" = yes; then :
5168 :
5169else
5170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5171/* end confdefs.h. */
5172#include <ctype.h>
5173#include <stdlib.h>
5174#if ((' ' & 0x0FF) == 0x020)
5175# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5176# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5177#else
5178# define ISLOWER(c) \
5179 (('a' <= (c) && (c) <= 'i') \
5180 || ('j' <= (c) && (c) <= 'r') \
5181 || ('s' <= (c) && (c) <= 'z'))
5182# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5183#endif
5184
5185#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5186int
5187main ()
5188{
5189 int i;
5190 for (i = 0; i < 256; i++)
5191 if (XOR (islower (i), ISLOWER (i))
5192 || toupper (i) != TOUPPER (i))
5193 return 2;
5194 return 0;
5195}
5196_ACEOF
5197if ac_fn_c_try_run "$LINENO"; then :
5198
5199else
5200 ac_cv_header_stdc=no
5201fi
5202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5203 conftest.$ac_objext conftest.beam conftest.$ac_ext
5204fi
5205
5206fi
5207fi
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5209$as_echo "$ac_cv_header_stdc" >&6; }
5210if test $ac_cv_header_stdc = yes; then
5211
5212$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5213
5214fi
5215
5216# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5217for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5218 inttypes.h stdint.h unistd.h
5219do :
5220 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5221ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5222"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005223if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 cat >>confdefs.h <<_ACEOF
5225#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5226_ACEOF
5227
5228fi
5229
5230done
5231
5232
5233
5234 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 +02005235if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 MINIX=yes
5237else
5238 MINIX=
5239fi
5240
5241
5242 if test "$MINIX" = yes; then
5243
5244$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5245
5246
5247$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5248
5249
5250$as_echo "#define _MINIX 1" >>confdefs.h
5251
5252 fi
5253
5254
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5256$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005257if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005258 $as_echo_n "(cached) " >&6
5259else
5260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5261/* end confdefs.h. */
5262
Trent Nelsona4519a62012-10-16 11:51:08 -04005263# define __EXTENSIONS__ 1
5264 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005265int
5266main ()
5267{
5268
5269 ;
5270 return 0;
5271}
5272_ACEOF
5273if ac_fn_c_try_compile "$LINENO"; then :
5274 ac_cv_safe_to_define___extensions__=yes
5275else
5276 ac_cv_safe_to_define___extensions__=no
5277fi
5278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5281$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5282 test $ac_cv_safe_to_define___extensions__ = yes &&
5283 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5284
5285 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5286
5287 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5288
5289 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5290
5291 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5292
5293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295# Check for unsupported systems
5296case $ac_sys_system/$ac_sys_release in
5297atheos*|Linux*/1*)
5298 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5299 echo See README for details.
5300 exit 1;;
5301esac
5302
5303
Matthias Kloseb9621712010-04-24 17:59:49 +00005304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5305$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306
5307# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005308if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 withval=$with_suffix;
5310 case $withval in
5311 no) EXEEXT=;;
5312 yes) EXEEXT=.exe;;
5313 *) EXEEXT=$withval;;
5314 esac
5315fi
5316
Matthias Kloseb9621712010-04-24 17:59:49 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5318$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319
5320# Test whether we're running on a non-case-sensitive system, in which
5321# case we give a warning if no ext is given
5322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5324$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325if test ! -d CaseSensitiveTestDir; then
5326mkdir CaseSensitiveTestDir
5327fi
5328
5329if test -d casesensitivetestdir
5330then
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5332$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333 BUILDEXEEXT=.exe
5334else
Matthias Kloseb9621712010-04-24 17:59:49 +00005335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337 BUILDEXEEXT=$EXEEXT
5338fi
5339rmdir CaseSensitiveTestDir
5340
5341case $MACHDEP in
5342bsdos*)
5343 case $CC in
5344 gcc) CC="$CC -D_HAVE_BSDI";;
5345 esac;;
5346esac
5347
5348case $ac_sys_system in
5349hp*|HP*)
5350 case $CC in
5351 cc|*/cc) CC="$CC -Ae";;
5352 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353esac
5354
5355
5356
Matthias Kloseb9621712010-04-24 17:59:49 +00005357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5358$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359if test -z "$LIBRARY"
5360then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005361 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5364$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366# LDLIBRARY is the name of the library to link against (as opposed to the
5367# name of the library into which to insert object files). BLDLIBRARY is also
5368# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5369# is blank as the main program is not linked directly against LDLIBRARY.
5370# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5371# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5372# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5373# DLLLIBRARY is the shared (i.e., DLL) library.
5374#
5375# RUNSHARED is used to run shared python without installed libraries
5376#
5377# INSTSONAME is the name of the shared library that will be use to install
5378# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005379#
5380# LDVERSION is the shared library version number, normally the Python version
5381# with the ABI build flags appended.
5382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384
5385
5386
5387
5388
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390LDLIBRARY="$LIBRARY"
5391BLDLIBRARY='$(LDLIBRARY)'
5392INSTSONAME='$(LDLIBRARY)'
5393DLLLIBRARY=''
5394LDLIBRARYDIR=''
5395RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005396LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397
5398# LINKCC is the command that links the python executable -- default is $(CC).
5399# If CXX is set, and if it is needed to link a main function that was
5400# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5401# python might then depend on the C++ runtime
5402# This is altered for AIX in order to build the export list before
5403# linking.
5404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5406$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407if test -z "$LINKCC"
5408then
5409 LINKCC='$(PURIFY) $(MAINCC)'
5410 case $ac_sys_system in
5411 AIX*)
5412 exp_extra="\"\""
5413 if test $ac_sys_release -ge 5 -o \
5414 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5415 exp_extra="."
5416 fi
5417 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 QNX*)
5419 # qcc must be used because the other compilers do not
5420 # support -N.
5421 LINKCC=qcc;;
5422 esac
5423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5425$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426
5427# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5428# make sure we default having it set to "no": this is used by
5429# distutils.unixccompiler to know if it should add --enable-new-dtags
5430# to linker command lines, and failing to detect GNU ld simply results
5431# in the same bahaviour as before.
5432
Matthias Kloseb9621712010-04-24 17:59:49 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5434$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435ac_prog=ld
5436if test "$GCC" = yes; then
5437 ac_prog=`$CC -print-prog-name=ld`
5438fi
5439case `"$ac_prog" -V 2>&1 < /dev/null` in
5440 *GNU*)
5441 GNULD=yes;;
5442 *)
5443 GNULD=no;;
5444esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5446$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5449$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005450if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005451 $as_echo_n "(cached) " >&6
5452else
5453 ac_cv_c_inline=no
5454for ac_kw in inline __inline__ __inline; do
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456/* end confdefs.h. */
5457#ifndef __cplusplus
5458typedef int foo_t;
5459static $ac_kw foo_t static_foo () {return 0; }
5460$ac_kw foo_t foo () {return 0; }
5461#endif
5462
5463_ACEOF
5464if ac_fn_c_try_compile "$LINENO"; then :
5465 ac_cv_c_inline=$ac_kw
5466fi
5467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5468 test "$ac_cv_c_inline" != no && break
5469done
5470
5471fi
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5473$as_echo "$ac_cv_c_inline" >&6; }
5474
5475case $ac_cv_c_inline in
5476 inline | yes) ;;
5477 *)
5478 case $ac_cv_c_inline in
5479 no) ac_val=;;
5480 *) ac_val=$ac_cv_c_inline;;
5481 esac
5482 cat >>confdefs.h <<_ACEOF
5483#ifndef __cplusplus
5484#define inline $ac_val
5485#endif
5486_ACEOF
5487 ;;
5488esac
5489
5490if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005491
5492$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005493
5494
5495fi
5496
5497
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5499$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005501if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502 enableval=$enable_shared;
5503fi
5504
5505
5506if test -z "$enable_shared"
5507then
5508 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005509 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 enable_shared="yes";;
5511 *)
5512 enable_shared="no";;
5513 esac
5514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5516$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5519$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005521if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005522 enableval=$enable_profiling;
5523fi
5524
5525if test "x$enable_profiling" = xyes; then
5526 ac_save_cc="$CC"
5527 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529/* end confdefs.h. */
5530int main() { return 0; }
5531_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005532if ac_fn_c_try_link "$LINENO"; then :
5533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005535 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005537rm -f core conftest.err conftest.$ac_objext \
5538 conftest$ac_exeext conftest.$ac_ext
5539 CC="$ac_save_cc"
5540else
5541 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5544$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
doko@ubuntu.comba015832012-06-30 16:52:05 +02005546if test "x$enable_profiling" = xyes; then
5547 BASECFLAGS="-pg $BASECFLAGS"
5548 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549fi
5550
Matthias Kloseb9621712010-04-24 17:59:49 +00005551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5552$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553
5554# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5555# library that we build, but we do not want to link against it (we
5556# will find it with a -framework option). For this reason there is an
5557# extra variable BLDLIBRARY against which Python and the extension
5558# modules are linked, BLDLIBRARY. This is normally the same as
5559# LDLIBRARY, but empty for MacOSX framework builds.
5560if test "$enable_framework"
5561then
5562 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5563 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5564 BLDLIBRARY=''
5565else
5566 BLDLIBRARY='$(LDLIBRARY)'
5567fi
5568
5569# Other platforms follow
5570if test $enable_shared = "yes"; then
5571
Matthias Kloseb9621712010-04-24 17:59:49 +00005572$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
5574 case $ac_sys_system in
5575 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005576 LDLIBRARY='libpython$(LDVERSION).dll.a'
5577 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578 ;;
5579 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005580 LDLIBRARY='libpython$(LDVERSION).so'
5581 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5583 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005584 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005585 then
5586 PY3LIBRARY=libpython3.so
5587 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005589 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005590 LDLIBRARY='libpython$(LDVERSION).so'
5591 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5593 case $ac_sys_system in
5594 FreeBSD*)
5595 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5596 ;;
5597 esac
5598 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005599 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005600 then
5601 PY3LIBRARY=libpython3.so
5602 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 ;;
5604 hp*|HP*)
5605 case `uname -m` in
5606 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005607 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 ;;
5609 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005610 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 ;;
5612 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005613 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5615 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005617 LDLIBRARY='libpython$(LDVERSION).dylib'
5618 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5620 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005621 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005622 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005623 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5624 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
5626 esac
5627else # shared is disabled
5628 case $ac_sys_system in
5629 CYGWIN*)
5630 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005631 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 ;;
5633 esac
5634fi
5635
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005636if test "$cross_compiling" = yes; then
5637 RUNSHARED=
5638fi
5639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5641$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
5643if test -n "$ac_tool_prefix"; then
5644 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5645set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005648if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650else
5651 if test -n "$RANLIB"; then
5652 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5653else
5654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657 IFS=$as_save_IFS
5658 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 break 2
5664 fi
5665done
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667IFS=$as_save_IFS
5668
5669fi
5670fi
5671RANLIB=$ac_cv_prog_RANLIB
5672if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5674$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675else
Matthias Kloseb9621712010-04-24 17:59:49 +00005676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5677$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678fi
5679
5680
5681fi
5682if test -z "$ac_cv_prog_RANLIB"; then
5683 ac_ct_RANLIB=$RANLIB
5684 # Extract the first word of "ranlib", so it can be a program name with args.
5685set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005688if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690else
5691 if test -n "$ac_ct_RANLIB"; then
5692 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5693else
5694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697 IFS=$as_save_IFS
5698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 break 2
5704 fi
5705done
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707IFS=$as_save_IFS
5708
5709fi
5710fi
5711ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5712if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5714$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715else
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718fi
5719
5720 if test "x$ac_ct_RANLIB" = x; then
5721 RANLIB=":"
5722 else
5723 case $cross_compiling:$ac_tool_warned in
5724yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727ac_tool_warned=yes ;;
5728esac
5729 RANLIB=$ac_ct_RANLIB
5730 fi
5731else
5732 RANLIB="$ac_cv_prog_RANLIB"
5733fi
5734
5735
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005736if test -n "$ac_tool_prefix"; then
5737 for ac_prog in ar aal
5738 do
5739 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005743if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745else
5746 if test -n "$AR"; then
5747 ac_cv_prog_AR="$AR" # Let the user override the test.
5748else
5749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752 IFS=$as_save_IFS
5753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005756 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 break 2
5759 fi
5760done
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762IFS=$as_save_IFS
5763
5764fi
5765fi
5766AR=$ac_cv_prog_AR
5767if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5769$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
5774
5775
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005776 test -n "$AR" && break
5777 done
5778fi
5779if test -z "$AR"; then
5780 ac_ct_AR=$AR
5781 for ac_prog in ar aal
5782do
5783 # Extract the first word of "$ac_prog", so it can be a program name with args.
5784set dummy $ac_prog; ac_word=$2
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if ${ac_cv_prog_ac_ct_AR+:} false; then :
5788 $as_echo_n "(cached) " >&6
5789else
5790 if test -n "$ac_ct_AR"; then
5791 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5792else
5793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796 IFS=$as_save_IFS
5797 test -z "$as_dir" && as_dir=.
5798 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005800 ac_cv_prog_ac_ct_AR="$ac_prog"
5801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802 break 2
5803 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005805 done
5806IFS=$as_save_IFS
5807
5808fi
5809fi
5810ac_ct_AR=$ac_cv_prog_ac_ct_AR
5811if test -n "$ac_ct_AR"; then
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5813$as_echo "$ac_ct_AR" >&6; }
5814else
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816$as_echo "no" >&6; }
5817fi
5818
5819
5820 test -n "$ac_ct_AR" && break
5821done
5822
5823 if test "x$ac_ct_AR" = x; then
5824 AR="ar"
5825 else
5826 case $cross_compiling:$ac_tool_warned in
5827yes:)
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5830ac_tool_warned=yes ;;
5831esac
5832 AR=$ac_ct_AR
5833 fi
5834fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835
5836
5837# tweak ARFLAGS only if the user didn't set it on the command line
5838
5839if test -z "$ARFLAGS"
5840then
5841 ARFLAGS="rc"
5842fi
5843
doko@ubuntu.com58844492012-06-30 18:25:32 +02005844if test -n "$ac_tool_prefix"; then
5845 for ac_prog in readelf
5846 do
5847 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5848set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if ${ac_cv_prog_READELF+:} false; then :
5852 $as_echo_n "(cached) " >&6
5853else
5854 if test -n "$READELF"; then
5855 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5856else
5857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858for as_dir in $PATH
5859do
5860 IFS=$as_save_IFS
5861 test -z "$as_dir" && as_dir=.
5862 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005864 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5865 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5866 break 2
5867 fi
5868done
5869 done
5870IFS=$as_save_IFS
5871
5872fi
5873fi
5874READELF=$ac_cv_prog_READELF
5875if test -n "$READELF"; then
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5877$as_echo "$READELF" >&6; }
5878else
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884 test -n "$READELF" && break
5885 done
5886fi
5887if test -z "$READELF"; then
5888 ac_ct_READELF=$READELF
5889 for ac_prog in readelf
5890do
5891 # Extract the first word of "$ac_prog", so it can be a program name with args.
5892set dummy $ac_prog; ac_word=$2
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5894$as_echo_n "checking for $ac_word... " >&6; }
5895if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5896 $as_echo_n "(cached) " >&6
5897else
5898 if test -n "$ac_ct_READELF"; then
5899 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5900else
5901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904 IFS=$as_save_IFS
5905 test -z "$as_dir" && as_dir=.
5906 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005908 ac_cv_prog_ac_ct_READELF="$ac_prog"
5909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910 break 2
5911 fi
5912done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917fi
5918ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5919if test -n "$ac_ct_READELF"; then
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5921$as_echo "$ac_ct_READELF" >&6; }
5922else
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925fi
5926
5927
5928 test -n "$ac_ct_READELF" && break
5929done
5930
5931 if test "x$ac_ct_READELF" = x; then
5932 READELF=":"
5933 else
5934 case $cross_compiling:$ac_tool_warned in
5935yes:)
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5937$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5938ac_tool_warned=yes ;;
5939esac
5940 READELF=$ac_ct_READELF
5941 fi
5942fi
5943
5944if test "$cross_compiling" = yes; then
5945 case "$READELF" in
5946 readelf|:)
5947 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5948 ;;
5949 esac
5950fi
5951
5952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005954DISABLE_ASDLGEN=""
5955# Extract the first word of "python", so it can be a program name with args.
5956set dummy python; ac_word=$2
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005959if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005960 $as_echo_n "(cached) " >&6
5961else
5962 if test -n "$HAS_PYTHON"; then
5963 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005972 ac_cv_prog_HAS_PYTHON="found"
5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976done
5977 done
5978IFS=$as_save_IFS
5979
5980 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5981fi
5982fi
5983HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5984if test -n "$HAS_PYTHON"; then
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5986$as_echo "$HAS_PYTHON" >&6; }
5987else
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993if test $HAS_HG != found -o $HAS_PYTHON != found
5994then
5995 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5996fi
5997
5998
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999case $MACHDEP in
6000bsdos*|hp*|HP*)
6001 # install -d does not work on BSDI or HP-UX
6002 if test -z "$INSTALL"
6003 then
6004 INSTALL="${srcdir}/install-sh -c"
6005 fi
6006esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007# Find a good install program. We prefer a C program (faster),
6008# so one script is as good as another. But avoid the broken or
6009# incompatible versions:
6010# SysV /etc/install, /usr/sbin/install
6011# SunOS /usr/etc/install
6012# IRIX /sbin/install
6013# AIX /bin/install
6014# AmigaOS /C/install, which installs bootblocks on floppy discs
6015# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6016# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6017# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6018# OS/2's system install, which has a completely different semantic
6019# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006020# Reject install programs that cannot install multiple files.
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6022$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006024if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
6027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030 IFS=$as_save_IFS
6031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 # Account for people who put trailing slashes in PATH elements.
6033case $as_dir/ in #((
6034 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 /usr/ucb/* ) ;;
6038 *)
6039 # OSF1 and SCO ODT 3.0 have their own names for install.
6040 # Don't use installbsd from OSF since it installs stuff as root
6041 # by default.
6042 for ac_prog in ginstall scoinst install; do
6043 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04006044 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 if test $ac_prog = install &&
6046 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6047 # AIX install. It has an incompatible calling convention.
6048 :
6049 elif test $ac_prog = install &&
6050 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6051 # program-specific install script used by HP pwplus--don't use.
6052 :
6053 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 rm -rf conftest.one conftest.two conftest.dir
6055 echo one > conftest.one
6056 echo two > conftest.two
6057 mkdir conftest.dir
6058 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6059 test -s conftest.one && test -s conftest.two &&
6060 test -s conftest.dir/conftest.one &&
6061 test -s conftest.dir/conftest.two
6062 then
6063 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6064 break 3
6065 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 fi
6067 fi
6068 done
6069 done
6070 ;;
6071esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006072
6073 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074IFS=$as_save_IFS
6075
Matthias Kloseb9621712010-04-24 17:59:49 +00006076rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077
6078fi
6079 if test "${ac_cv_path_install+set}" = set; then
6080 INSTALL=$ac_cv_path_install
6081 else
6082 # As a last resort, use the slow shell script. Don't cache a
6083 # value for INSTALL within a source directory, because that will
6084 # break other packages using the cache if that directory is
6085 # removed, or if the value is a relative name.
6086 INSTALL=$ac_install_sh
6087 fi
6088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6090$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091
6092# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6093# It thinks the first close brace ends the variable substitution.
6094test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6095
6096test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6097
6098test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6099
Matthias Klose93a0ef12012-03-15 18:08:34 +01006100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6101$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6102if test -z "$MKDIR_P"; then
6103 if ${ac_cv_path_mkdir+:} false; then :
6104 $as_echo_n "(cached) " >&6
6105else
6106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_prog in mkdir gmkdir; do
6112 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04006113 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006114 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6115 'mkdir (GNU coreutils) '* | \
6116 'mkdir (coreutils) '* | \
6117 'mkdir (fileutils) '4.1*)
6118 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6119 break 3;;
6120 esac
6121 done
6122 done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127
6128 test -d ./--version && rmdir ./--version
6129 if test "${ac_cv_path_mkdir+set}" = set; then
6130 MKDIR_P="$ac_cv_path_mkdir -p"
6131 else
6132 # As a last resort, use the slow shell script. Don't cache a
6133 # value for MKDIR_P within a source directory, because that will
6134 # break other packages using the cache if that directory is
6135 # removed, or if the value is a relative name.
6136 MKDIR_P="$ac_install_sh -d"
6137 fi
6138fi
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6140$as_echo "$MKDIR_P" >&6; }
6141
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142
6143# Not every filesystem supports hard links
6144
6145if test -z "$LN" ; then
6146 case $ac_sys_system in
6147 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 *) LN=ln;;
6149 esac
6150fi
6151
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006152# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006153
6154ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6158$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159
6160# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006161if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162 withval=$with_pydebug;
6163if test "$withval" != no
6164then
6165
Matthias Kloseb9621712010-04-24 17:59:49 +00006166$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6169$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006171 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006172else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174fi
6175else
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178fi
6179
6180
6181# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6182# merged with this chunk of code?
6183
6184# Optimizer/debugger flags
6185# ------------------------
6186# (The following bit of code is complicated enough - please keep things
6187# indented properly. Just pretend you're editing Python code. ;-)
6188
6189# There are two parallel sets of case statements below, one that checks to
6190# see if OPT was set and one that does BASECFLAGS setting based upon
6191# compiler and platform. BASECFLAGS tweaks need to be made even if the
6192# user set OPT.
6193
6194# tweak OPT based on compiler and platform, only if the user didn't set
6195# it on the command line
6196
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006197if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198then
6199 case $GCC in
6200 yes)
6201 if test "$CC" != 'g++' ; then
6202 STRICT_PROTO="-Wstrict-prototypes"
6203 fi
6204 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6205 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6206 WRAP="-fwrapv"
6207 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006208
6209 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006210 case $CC in
6211 *clang*) WRAP="-fwrapv"
6212 ;;
6213 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006214
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215 case $ac_cv_prog_cc_g in
6216 yes)
6217 if test "$Py_DEBUG" = 'true' ; then
6218 # Optimization messes up debuggers, so turn it off for
6219 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006220 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221 else
6222 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6223 fi
6224 ;;
6225 *)
6226 OPT="-O3 -Wall $STRICT_PROTO"
6227 ;;
6228 esac
6229 case $ac_sys_system in
6230 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6231 ;;
6232 esac
6233 ;;
6234
6235 *)
6236 OPT="-O"
6237 ;;
6238 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239fi
6240
6241
6242
6243# The -arch flags for universal builds on OSX
6244UNIVERSAL_ARCH_FLAGS=
6245
6246
6247# tweak BASECFLAGS based on compiler and platform
6248case $GCC in
6249yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006250 # Python doesn't violate C99 aliasing rules, but older versions of
6251 # GCC produce warnings for legal Python code. Enable
6252 # -fno-strict-aliasing on versions of GCC that support but produce
6253 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6255$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256 ac_save_cc="$CC"
6257 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006258 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006259 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006260 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006261else
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006264
Matthias Kloseb159a552010-04-25 21:00:44 +00006265
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006266int
6267main ()
6268{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006269
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006270 ;
6271 return 0;
6272}
Matthias Kloseb159a552010-04-25 21:00:44 +00006273
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006275if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006276
6277 CC="$ac_save_cc -fstrict-aliasing"
6278 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006280/* end confdefs.h. */
6281
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006282 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283int
6284main ()
6285{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006286double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006287 ;
6288 return 0;
6289}
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006292if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006293
6294 ac_cv_no_strict_aliasing=no
6295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296else
Matthias Kloseb159a552010-04-25 21:00:44 +00006297
6298 ac_cv_no_strict_aliasing=yes
6299
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006300fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006302
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006303else
Matthias Kloseb159a552010-04-25 21:00:44 +00006304
6305 ac_cv_no_strict_aliasing=no
6306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006309fi
6310
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006311 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6314$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 then
6317 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6318 fi
6319
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6321$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6322 ac_save_cc="$CC"
6323 CC="$CC -Wunused-result -Werror"
6324 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006325 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006326 $as_echo_n "(cached) " >&6
6327else
6328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6329/* end confdefs.h. */
6330
6331
6332int
6333main ()
6334{
6335
6336 ;
6337 return 0;
6338}
6339
6340_ACEOF
6341if ac_fn_c_try_compile "$LINENO"; then :
6342
6343 ac_cv_disable_unused_result_warning=yes
6344
6345else
6346
6347 ac_cv_disable_unused_result_warning=no
6348
6349fi
6350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6351fi
6352
6353 CFLAGS="$save_CFLAGS"
6354 CC="$ac_save_cc"
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6356$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6357
6358 if test $ac_cv_disable_unused_result_warning = yes
6359 then
6360 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6361 fi
6362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6364 # support. Without this, treatment of subnormals doesn't follow
6365 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006366 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 alpha*)
6368 BASECFLAGS="$BASECFLAGS -mieee"
6369 ;;
6370 esac
6371
6372 case $ac_sys_system in
6373 SCO_SV*)
6374 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6375 ;;
6376 # is there any other compiler on Darwin besides gcc?
6377 Darwin*)
6378 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6379 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006380 if test "${CC}" = gcc
6381 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6383$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006384 case "${UNIVERSALSDK}" in
6385 */MacOSX10.4u.sdk)
6386 # Build using 10.4 SDK, force usage of gcc when the
6387 # compiler is gcc, otherwise the user will get very
6388 # confusing error messages when building on OSX 10.6
6389 CC=gcc-4.0
6390 CPP=cpp-4.0
6391 ;;
6392 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6394$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006395 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396
6397
6398 if test "${enable_universalsdk}"; then
6399 UNIVERSAL_ARCH_FLAGS=""
6400 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6401 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6402 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006403 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6405 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006406 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006407 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408
6409 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6410 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006411 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006412 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006414 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6415 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006416 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006417 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006418
6419 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6420 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006421 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006422 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006425 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 +00006426
6427 fi
6428
6429
Ronald Oussoren666028b2010-04-18 19:07:43 +00006430 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6431 if test "${UNIVERSALSDK}" != "/"
6432 then
6433 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6434 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006435 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436 fi
6437 fi
6438
6439 # Calculate the right deployment target for this build.
6440 #
6441 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006442 if test ${cur_target} '>' 10.2 && \
6443 test ${cur_target} '<' 10.6
6444 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006446 if test ${enable_universalsdk}; then
6447 if test "${UNIVERSAL_ARCHS}" = "all"; then
6448 # Ensure that the default platform for a
6449 # 4-way universal build is OSX 10.5,
6450 # that's the first OS release where
6451 # 4-way builds make sense.
6452 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006453
6454 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6455 cur_target='10.5'
6456
6457 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6458 cur_target='10.5'
6459
6460 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6461 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006462 fi
6463 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006464 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006465 # On Intel macs default to a deployment
6466 # target of 10.4, that's the first OSX
6467 # release with Intel support.
6468 cur_target="10.4"
6469 fi
6470 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006471 fi
6472 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6473
6474 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6475 # environment with a value that is the same as what we'll use
6476 # in the Makefile to ensure that we'll get the same compiler
6477 # environment during configure and build time.
6478 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6479 export MACOSX_DEPLOYMENT_TARGET
6480 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6481
6482 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483 esac
6484 ;;
6485
6486*)
6487 case $ac_sys_system in
6488 OpenUNIX*|UnixWare*)
6489 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6490 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491 SCO_SV*)
6492 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6493 ;;
6494 esac
6495 ;;
6496esac
6497
6498if test "$Py_DEBUG" = 'true'; then
6499 :
6500else
6501 OPT="-DNDEBUG $OPT"
6502fi
6503
6504if test "$ac_arch_flags"
6505then
6506 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6507fi
6508
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509# Check whether GCC supports PyArg_ParseTuple format
6510if test "$GCC" = "yes"
6511then
Matthias Kloseb9621712010-04-24 17:59:49 +00006512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6513$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514 save_CFLAGS=$CFLAGS
6515 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517/* end confdefs.h. */
6518
6519 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520int
6521main ()
6522{
6523
6524 ;
6525 return 0;
6526}
Matthias Kloseb159a552010-04-25 21:00:44 +00006527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006529if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530
Matthias Kloseb159a552010-04-25 21:00:44 +00006531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533
Matthias Kloseb159a552010-04-25 21:00:44 +00006534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006535$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006536
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537else
Matthias Kloseb159a552010-04-25 21:00:44 +00006538
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006540$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541
6542fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544 CFLAGS=$save_CFLAGS
6545fi
6546
6547# On some compilers, pthreads are available without further options
6548# (e.g. MacOS X). On some of these systems, the compiler will not
6549# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6550# So we have to see first whether pthreads are available without
6551# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6553$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006554if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556else
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558 ac_cv_pthread_is_default=no
6559else
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561/* end confdefs.h. */
6562
6563#include <pthread.h>
6564
6565void* routine(void* p){return NULL;}
6566
6567int main(){
6568 pthread_t p;
6569 if(pthread_create(&p,NULL,routine,NULL)!=0)
6570 return 1;
6571 (void)pthread_detach(p);
6572 return 0;
6573}
6574
6575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006576if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577
6578 ac_cv_pthread_is_default=yes
6579 ac_cv_kthread=no
6580 ac_cv_pthread=no
6581
6582else
Matthias Kloseb9621712010-04-24 17:59:49 +00006583 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587fi
6588
6589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590fi
6591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6593$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006594
6595
6596if test $ac_cv_pthread_is_default = yes
6597then
6598 ac_cv_kpthread=no
6599else
6600# -Kpthread, if available, provides the right #defines
6601# and linker options to make pthread_create available
6602# Some compilers won't report that they do not support -Kpthread,
6603# so we need to run a program to see whether it really made the
6604# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6606$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006607if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006608 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609else
6610 ac_save_cc="$CC"
6611CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006612if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613 ac_cv_kpthread=no
6614else
Matthias Kloseb9621712010-04-24 17:59:49 +00006615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006616/* end confdefs.h. */
6617
6618#include <pthread.h>
6619
6620void* routine(void* p){return NULL;}
6621
6622int main(){
6623 pthread_t p;
6624 if(pthread_create(&p,NULL,routine,NULL)!=0)
6625 return 1;
6626 (void)pthread_detach(p);
6627 return 0;
6628}
6629
6630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632 ac_cv_kpthread=yes
6633else
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638fi
6639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640CC="$ac_save_cc"
6641fi
6642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6644$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006645fi
6646
6647if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6648then
6649# -Kthread, if available, provides the right #defines
6650# and linker options to make pthread_create available
6651# Some compilers won't report that they do not support -Kthread,
6652# so we need to run a program to see whether it really made the
6653# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6655$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006656if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658else
6659 ac_save_cc="$CC"
6660CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006661if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662 ac_cv_kthread=no
6663else
Matthias Kloseb9621712010-04-24 17:59:49 +00006664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006665/* end confdefs.h. */
6666
6667#include <pthread.h>
6668
6669void* routine(void* p){return NULL;}
6670
6671int main(){
6672 pthread_t p;
6673 if(pthread_create(&p,NULL,routine,NULL)!=0)
6674 return 1;
6675 (void)pthread_detach(p);
6676 return 0;
6677}
6678
6679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681 ac_cv_kthread=yes
6682else
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687fi
6688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689CC="$ac_save_cc"
6690fi
6691
Matthias Kloseb9621712010-04-24 17:59:49 +00006692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6693$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694fi
6695
6696if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6697then
6698# -pthread, if available, provides the right #defines
6699# and linker options to make pthread_create available
6700# Some compilers won't report that they do not support -pthread,
6701# so we need to run a program to see whether it really made the
6702# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6704$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006705if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707else
6708 ac_save_cc="$CC"
6709CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006710if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711 ac_cv_pthread=no
6712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714/* end confdefs.h. */
6715
6716#include <pthread.h>
6717
6718void* routine(void* p){return NULL;}
6719
6720int main(){
6721 pthread_t p;
6722 if(pthread_create(&p,NULL,routine,NULL)!=0)
6723 return 1;
6724 (void)pthread_detach(p);
6725 return 0;
6726}
6727
6728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006729if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730 ac_cv_pthread=yes
6731else
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736fi
6737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738CC="$ac_save_cc"
6739fi
6740
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6742$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743fi
6744
6745# If we have set a CC compiler flag for thread support then
6746# check if it works for CXX, too.
6747ac_cv_cxx_thread=no
6748if test ! -z "$CXX"
6749then
Matthias Kloseb9621712010-04-24 17:59:49 +00006750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6751$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752ac_save_cxx="$CXX"
6753
6754if test "$ac_cv_kpthread" = "yes"
6755then
6756 CXX="$CXX -Kpthread"
6757 ac_cv_cxx_thread=yes
6758elif test "$ac_cv_kthread" = "yes"
6759then
6760 CXX="$CXX -Kthread"
6761 ac_cv_cxx_thread=yes
6762elif test "$ac_cv_pthread" = "yes"
6763then
6764 CXX="$CXX -pthread"
6765 ac_cv_cxx_thread=yes
6766fi
6767
6768if test $ac_cv_cxx_thread = yes
6769then
6770 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6771 $CXX -c conftest.$ac_ext 2>&5
6772 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6773 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6774 then
6775 ac_cv_cxx_thread=yes
6776 else
6777 ac_cv_cxx_thread=no
6778 fi
6779 rm -fr conftest*
6780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6782$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783fi
6784CXX="$ac_save_cxx"
6785
6786
6787# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6789$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006790if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794/* end confdefs.h. */
6795#include <stdlib.h>
6796#include <stdarg.h>
6797#include <string.h>
6798#include <float.h>
6799
6800int
6801main ()
6802{
6803
6804 ;
6805 return 0;
6806}
6807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006808if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809 ac_cv_header_stdc=yes
6810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6814
6815if test $ac_cv_header_stdc = yes; then
6816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818/* end confdefs.h. */
6819#include <string.h>
6820
6821_ACEOF
6822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 $EGREP "memchr" >/dev/null 2>&1; then :
6824
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825else
6826 ac_cv_header_stdc=no
6827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006828rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829
6830fi
6831
6832if test $ac_cv_header_stdc = yes; then
6833 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835/* end confdefs.h. */
6836#include <stdlib.h>
6837
6838_ACEOF
6839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $EGREP "free" >/dev/null 2>&1; then :
6841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842else
6843 ac_cv_header_stdc=no
6844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006845rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846
6847fi
6848
6849if test $ac_cv_header_stdc = yes; then
6850 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852 :
6853else
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855/* end confdefs.h. */
6856#include <ctype.h>
6857#include <stdlib.h>
6858#if ((' ' & 0x0FF) == 0x020)
6859# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6860# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6861#else
6862# define ISLOWER(c) \
6863 (('a' <= (c) && (c) <= 'i') \
6864 || ('j' <= (c) && (c) <= 'r') \
6865 || ('s' <= (c) && (c) <= 'z'))
6866# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6867#endif
6868
6869#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6870int
6871main ()
6872{
6873 int i;
6874 for (i = 0; i < 256; i++)
6875 if (XOR (islower (i), ISLOWER (i))
6876 || toupper (i) != TOUPPER (i))
6877 return 2;
6878 return 0;
6879}
6880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006881if ac_fn_c_try_run "$LINENO"; then :
6882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883else
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888fi
6889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890fi
6891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6893$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894if test $ac_cv_header_stdc = yes; then
6895
Matthias Kloseb9621712010-04-24 17:59:49 +00006896$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897
6898fi
6899
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006900ac_save_cppflags="$CPPFLAGS"
6901CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006902for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006903fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006904ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006905sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006906unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006907poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006908sys/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 +01006909sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006910sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006911sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006912sys/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 -07006913libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006914bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006915do :
6916 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6917ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006918if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006920#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006921_ACEOF
6922
6923fi
6924
Guido van Rossum627b2d71993-12-24 10:39:16 +00006925done
6926
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006927CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006928ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006929for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6932$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006933if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935else
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006937/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006938#include <sys/types.h>
6939#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941int
6942main ()
6943{
6944if ((DIR *) 0)
6945return 0;
6946 ;
6947 return 0;
6948}
6949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006951 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006952else
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957eval ac_res=\$$as_ac_Header
6958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6959$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006960if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006962#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006963_ACEOF
6964
6965ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968done
6969# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6970if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6972$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006973if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006975else
Martin v. Löwis11437992002-04-12 09:54:03 +00006976 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980/* Override any GCC internal prototype to avoid an error.
6981 Use char because int might match the return type of a GCC
6982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006983#ifdef __cplusplus
6984extern "C"
6985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006986char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006987int
6988main ()
6989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006991 ;
6992 return 0;
6993}
6994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995for ac_lib in '' dir; do
6996 if test -z "$ac_lib"; then
6997 ac_res="none required"
6998 else
6999 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005rm -f core conftest.err conftest.$ac_objext \
7006 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007007 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010done
Victor Stinnere0be4232011-10-25 13:06:09 +02007011if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013else
7014 ac_cv_search_opendir=no
7015fi
7016rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007017LIBS=$ac_func_search_save_LIBS
7018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7020$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007022if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007026
Michael W. Hudson54241132001-12-07 15:38:26 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7029$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007030if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007032else
7033 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037/* Override any GCC internal prototype to avoid an error.
7038 Use char because int might match the return type of a GCC
7039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007040#ifdef __cplusplus
7041extern "C"
7042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007043char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007044int
7045main ()
7046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007047return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007048 ;
7049 return 0;
7050}
7051_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052for ac_lib in '' x; do
7053 if test -z "$ac_lib"; then
7054 ac_res="none required"
7055 else
7056 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007057 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062rm -f core conftest.err conftest.$ac_objext \
7063 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007064 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067done
Victor Stinnere0be4232011-10-25 13:06:09 +02007068if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070else
7071 ac_cv_search_opendir=no
7072fi
7073rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007074LIBS=$ac_func_search_save_LIBS
7075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7077$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007079if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007082fi
7083
7084fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007085
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7087$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007088if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007092/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007093#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007094int
7095main ()
7096{
7097return makedev(0, 0);
7098 ;
7099 return 0;
7100}
7101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007103 ac_cv_header_sys_types_h_makedev=yes
7104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007107rm -f core conftest.err conftest.$ac_objext \
7108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007109
7110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7112$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007113
7114if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007115ac_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 +02007116if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007117
Matthias Kloseb9621712010-04-24 17:59:49 +00007118$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007119
7120fi
7121
7122
7123
7124 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 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 +02007126if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007129
7130fi
7131
7132
7133 fi
7134fi
7135
Michael W. Hudson54241132001-12-07 15:38:26 +00007136
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007137# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7138for ac_header in net/if.h
7139do :
7140 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7141#ifdef STDC_HEADERS
7142# include <stdlib.h>
7143# include <stddef.h>
7144#else
7145# ifdef HAVE_STDLIB_H
7146# include <stdlib.h>
7147# endif
7148#endif
7149#ifdef HAVE_SYS_SOCKET_H
7150# include <sys/socket.h>
7151#endif
7152
7153"
Victor Stinnere0be4232011-10-25 13:06:09 +02007154if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007155 cat >>confdefs.h <<_ACEOF
7156#define HAVE_NET_IF_H 1
7157_ACEOF
7158
7159fi
7160
7161done
7162
7163
7164
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007165# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007166for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007167do :
7168 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007169#ifdef HAVE_CURSES_H
7170#include <curses.h>
7171#endif
7172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173"
Victor Stinnere0be4232011-10-25 13:06:09 +02007174if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007176#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007177_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007178
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007179fi
7180
7181done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007182
7183
Martin v. Löwis11017b12006-01-14 18:12:57 +00007184# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007185for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007186do :
7187 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 +00007188#ifdef HAVE_ASM_TYPES_H
7189#include <asm/types.h>
7190#endif
7191#ifdef HAVE_SYS_SOCKET_H
7192#include <sys/socket.h>
7193#endif
7194
Matthias Kloseb9621712010-04-24 17:59:49 +00007195"
Victor Stinnere0be4232011-10-25 13:06:09 +02007196if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007197 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007198#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007199_ACEOF
7200
7201fi
7202
7203done
7204
7205
Charles-François Natali47413c12011-10-06 19:47:44 +02007206# On Linux, can.h and can/raw.h require sys/socket.h
7207for ac_header in linux/can.h linux/can/raw.h
7208do :
7209 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7210ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7211#ifdef HAVE_SYS_SOCKET_H
7212#include <sys/socket.h>
7213#endif
7214
7215"
7216if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7217 cat >>confdefs.h <<_ACEOF
7218#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7219_ACEOF
7220
7221fi
7222
7223done
7224
7225
Guido van Rossum627b2d71993-12-24 10:39:16 +00007226# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007227was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7229$as_echo_n "checking for clock_t in time.h... " >&6; }
7230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007231/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007232#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007233
7234_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007237 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007238else
Martin v. Löwis11437992002-04-12 09:54:03 +00007239
7240
Matthias Kloseb9621712010-04-24 17:59:49 +00007241$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007242
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007243
Guido van Rossum627b2d71993-12-24 10:39:16 +00007244fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007245rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7248$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007249
Matthias Kloseb9621712010-04-24 17:59:49 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7251$as_echo_n "checking for makedev... " >&6; }
7252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007253/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007254
Jesus Cea740f53a2010-04-28 11:35:30 +00007255#if defined(MAJOR_IN_MKDEV)
7256#include <sys/mkdev.h>
7257#elif defined(MAJOR_IN_SYSMACROS)
7258#include <sys/sysmacros.h>
7259#else
7260#include <sys/types.h>
7261#endif
7262
Neal Norwitz11690112002-07-30 01:08:28 +00007263int
7264main ()
7265{
Jesus Cea740f53a2010-04-28 11:35:30 +00007266
7267 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007268 ;
7269 return 0;
7270}
Matthias Kloseb159a552010-04-25 21:00:44 +00007271
Neal Norwitz11690112002-07-30 01:08:28 +00007272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007273if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007274 ac_cv_has_makedev=yes
7275else
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278rm -f core conftest.err conftest.$ac_objext \
7279 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7281$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007282if test "$ac_cv_has_makedev" = "yes"; then
7283
Matthias Kloseb9621712010-04-24 17:59:49 +00007284$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007285
7286fi
7287
Martin v. Löwis399a6892002-10-04 10:22:02 +00007288# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7289# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7290# defined, but the compiler does not support pragma redefine_extname,
7291# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7292# structures (such as rlimit64) without declaring them. As a
7293# work-around, disable LFS on such configurations
7294
7295use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7297$as_echo_n "checking Solaris LFS bug... " >&6; }
7298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007299/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007300
7301#define _LARGEFILE_SOURCE 1
7302#define _FILE_OFFSET_BITS 64
7303#include <sys/resource.h>
7304
Martin v. Löwis399a6892002-10-04 10:22:02 +00007305int
7306main ()
7307{
7308struct rlimit foo;
7309 ;
7310 return 0;
7311}
7312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007314 sol_lfs_bug=no
7315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7320$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007321if test "$sol_lfs_bug" = "yes"; then
7322 use_lfs=no
7323fi
7324
7325if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007326# Two defines needed to enable largefile support on various platforms
7327# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007328case $ac_sys_system/$ac_sys_release in
7329AIX*)
7330
7331$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7332
7333 ;;
7334esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007335
Matthias Kloseb9621712010-04-24 17:59:49 +00007336$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007337
7338
Matthias Kloseb9621712010-04-24 17:59:49 +00007339$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007340
Martin v. Löwis399a6892002-10-04 10:22:02 +00007341fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007342
Guido van Rossum84e7b241996-08-19 21:59:00 +00007343# Add some code to confdefs.h so that the test for off_t works on SCO
7344cat >> confdefs.h <<\EOF
7345#if defined(SCO_DS)
7346#undef _OFF_T
7347#endif
7348EOF
7349
Guido van Rossumef2255b2000-03-10 22:30:29 +00007350# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007351ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007352if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007354else
Martin v. Löwis11437992002-04-12 09:54:03 +00007355
7356cat >>confdefs.h <<_ACEOF
7357#define mode_t int
7358_ACEOF
7359
7360fi
7361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007363if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007364
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007365else
Martin v. Löwis11437992002-04-12 09:54:03 +00007366
7367cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007368#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007369_ACEOF
7370
7371fi
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007375
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007376else
Martin v. Löwis11437992002-04-12 09:54:03 +00007377
7378cat >>confdefs.h <<_ACEOF
7379#define pid_t int
7380_ACEOF
7381
7382fi
7383
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007386#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007387_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007388
Matthias Kloseb9621712010-04-24 17:59:49 +00007389ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007390if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007391
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007392else
Martin v. Löwis11437992002-04-12 09:54:03 +00007393
7394cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007395#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007396_ACEOF
7397
7398fi
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7401$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007402if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007404else
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007407#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007408
7409_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007412 ac_cv_type_uid_t=yes
7413else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007414 ac_cv_type_uid_t=no
7415fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007416rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7420$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007421if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007424
7425
Matthias Kloseb9621712010-04-24 17:59:49 +00007426$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427
7428fi
7429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7431case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007432 no|yes) ;; #(
7433 *)
7434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007436
7437
7438cat >>confdefs.h <<_ACEOF
7439#define uint32_t $ac_cv_c_uint32_t
7440_ACEOF
7441;;
7442 esac
7443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7445case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007446 no|yes) ;; #(
7447 *)
7448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007450
7451
7452cat >>confdefs.h <<_ACEOF
7453#define uint64_t $ac_cv_c_uint64_t
7454_ACEOF
7455;;
7456 esac
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7459case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007460 no|yes) ;; #(
7461 *)
7462
7463cat >>confdefs.h <<_ACEOF
7464#define int32_t $ac_cv_c_int32_t
7465_ACEOF
7466;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007467esac
7468
Matthias Kloseb9621712010-04-24 17:59:49 +00007469ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7470case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007471 no|yes) ;; #(
7472 *)
7473
7474cat >>confdefs.h <<_ACEOF
7475#define int64_t $ac_cv_c_int64_t
7476_ACEOF
7477;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007478esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007481if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007484
7485fi
7486
Stefan Krah1919b7e2012-03-21 18:25:23 +01007487ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7488if test "x$ac_cv_type___uint128_t" = xyes; then :
7489
7490$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7491
7492fi
7493
Jack Jansendd19cf82001-12-06 22:36:17 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007496# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007497# The cast to long int works around a bug in the HP C Compiler
7498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7502$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007503if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 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 +00007507
Martin v. Löwis11437992002-04-12 09:54:03 +00007508else
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 if test "$ac_cv_type_int" = yes; then
7510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007512as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007513See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007514 else
7515 ac_cv_sizeof_int=0
7516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7521$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007522
7523
7524
Martin v. Löwis11437992002-04-12 09:54:03 +00007525cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007526#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007527_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007528
7529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530# The cast to long int works around a bug in the HP C Compiler
7531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7533# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7535$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007536if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007538else
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 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 +00007540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 if test "$ac_cv_type_long" = yes; then
7543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007545as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007546See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007547 else
7548 ac_cv_sizeof_long=0
7549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007551
Martin v. Löwis11437992002-04-12 09:54:03 +00007552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7554$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007555
7556
7557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007559#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007560_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007561
7562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007563# The cast to long int works around a bug in the HP C Compiler
7564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7568$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007569if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 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 +00007573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 if test "$ac_cv_type_void_p" = yes; then
7576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007578as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580 else
7581 ac_cv_sizeof_void_p=0
7582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007584
Martin v. Löwis11437992002-04-12 09:54:03 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7587$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588
7589
7590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007592#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007593_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007594
7595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596# The cast to long int works around a bug in the HP C Compiler
7597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7601$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007602if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 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 +00007606
Martin v. Löwis11437992002-04-12 09:54:03 +00007607else
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 if test "$ac_cv_type_short" = yes; then
7609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007611as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613 else
7614 ac_cv_sizeof_short=0
7615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007617
Martin v. Löwis11437992002-04-12 09:54:03 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7620$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621
7622
7623
Martin v. Löwis11437992002-04-12 09:54:03 +00007624cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007625#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007626_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007627
7628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629# The cast to long int works around a bug in the HP C Compiler
7630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7634$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007635if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007637else
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 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 +00007639
Martin v. Löwis11437992002-04-12 09:54:03 +00007640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 if test "$ac_cv_type_float" = yes; then
7642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007644as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007645See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646 else
7647 ac_cv_sizeof_float=0
7648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007650
Martin v. Löwis11437992002-04-12 09:54:03 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7653$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654
7655
7656
Martin v. Löwis11437992002-04-12 09:54:03 +00007657cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007658#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007659_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007660
7661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662# The cast to long int works around a bug in the HP C Compiler
7663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7667$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007668if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007670else
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 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 +00007672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673else
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 if test "$ac_cv_type_double" = yes; then
7675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007677as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 else
7680 ac_cv_sizeof_double=0
7681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7686$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687
7688
7689
Martin v. Löwis11437992002-04-12 09:54:03 +00007690cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007691#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007692_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007693
7694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695# The cast to long int works around a bug in the HP C Compiler
7696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7700$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007701if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 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 +00007705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 if test "$ac_cv_type_fpos_t" = yes; then
7708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007710as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007711See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712 else
7713 ac_cv_sizeof_fpos_t=0
7714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7719$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720
7721
7722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007724#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007725_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007726
Michael W. Hudson54241132001-12-07 15:38:26 +00007727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728# The cast to long int works around a bug in the HP C Compiler
7729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7733$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007734if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007736else
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 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 +00007738
Martin v. Löwis18e16552006-02-15 17:27:45 +00007739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 if test "$ac_cv_type_size_t" = yes; then
7741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007743as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745 else
7746 ac_cv_sizeof_size_t=0
7747 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007749
Martin v. Löwis18e16552006-02-15 17:27:45 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7752$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753
7754
7755
Martin v. Löwis18e16552006-02-15 17:27:45 +00007756cat >>confdefs.h <<_ACEOF
7757#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7758_ACEOF
7759
7760
Christian Heimes400adb02008-02-01 08:12:03 +00007761# The cast to long int works around a bug in the HP C Compiler
7762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7766$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007767if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 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 +00007771
Christian Heimes400adb02008-02-01 08:12:03 +00007772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 if test "$ac_cv_type_pid_t" = yes; then
7774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007776as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007777See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007778 else
7779 ac_cv_sizeof_pid_t=0
7780 fi
7781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007782
Christian Heimes400adb02008-02-01 08:12:03 +00007783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7785$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007786
7787
7788
7789cat >>confdefs.h <<_ACEOF
7790#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7791_ACEOF
7792
7793
Michael W. Hudson54241132001-12-07 15:38:26 +00007794
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7796$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007797have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007799/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007800
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007804long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ;
7806 return 0;
7807}
7808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
7811
Matthias Kloseb9621712010-04-24 17:59:49 +00007812$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007814 have_long_long=yes
7815
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7819$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007820if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821# The cast to long int works around a bug in the HP C Compiler
7822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7826$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007827if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 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 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 if test "$ac_cv_type_long_long" = yes; then
7834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007836as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 else
7839 ac_cv_sizeof_long_long=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7845$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846
7847
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007850#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007851_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007852
Michael W. Hudson54241132001-12-07 15:38:26 +00007853
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007854fi
7855
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7857$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007858have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007860/* end confdefs.h. */
7861
7862int
7863main ()
7864{
7865long double x; x = (long double)0;
7866 ;
7867 return 0;
7868}
7869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007870if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007871
7872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007874
7875 have_long_double=yes
7876
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007877fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7880$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007881if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007882# The cast to long int works around a bug in the HP C Compiler
7883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7887$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007888if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 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 +00007892
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007893else
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 if test "$ac_cv_type_long_double" = yes; then
7895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007897as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007898See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007899 else
7900 ac_cv_sizeof_long_double=0
7901 fi
7902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7906$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007907
7908
7909
7910cat >>confdefs.h <<_ACEOF
7911#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7912_ACEOF
7913
7914
7915fi
7916
7917
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7919$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007920have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007922/* end confdefs.h. */
7923
7924int
7925main ()
7926{
7927_Bool x; x = (_Bool)0;
7928 ;
7929 return 0;
7930}
7931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007933
7934
Matthias Kloseb9621712010-04-24 17:59:49 +00007935$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007936
7937 have_c99_bool=yes
7938
Thomas Woutersb2137042007-02-01 18:02:27 +00007939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7942$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007943if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944# The cast to long int works around a bug in the HP C Compiler
7945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7947# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7949$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007950if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 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 +00007954
Thomas Woutersb2137042007-02-01 18:02:27 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 if test "$ac_cv_type__Bool" = yes; then
7957 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007959as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007960See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961 else
7962 ac_cv_sizeof__Bool=0
7963 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965
Thomas Woutersb2137042007-02-01 18:02:27 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7968$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969
7970
7971
Thomas Woutersb2137042007-02-01 18:02:27 +00007972cat >>confdefs.h <<_ACEOF
7973#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7974_ACEOF
7975
7976
7977fi
7978
Matthias Kloseb9621712010-04-24 17:59:49 +00007979ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007980 #include <stdint.h>
7981 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007982 #ifdef HAVE_INTTYPES_H
7983 #include <inttypes.h>
7984 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007985"
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007987
7988cat >>confdefs.h <<_ACEOF
7989#define HAVE_UINTPTR_T 1
7990_ACEOF
7991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992# The cast to long int works around a bug in the HP C Compiler
7993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7997$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007998if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 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 +00008002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 if test "$ac_cv_type_uintptr_t" = yes; then
8005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008007as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008008See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 else
8010 ac_cv_sizeof_uintptr_t=0
8011 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8016$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017
8018
8019
Martin v. Löwis11437992002-04-12 09:54:03 +00008020cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008021#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008022_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008023
Michael W. Hudson54241132001-12-07 15:38:26 +00008024
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008025fi
8026
Thomas Wouters89f507f2006-12-13 04:49:30 +00008027
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008028# The cast to long int works around a bug in the HP C Compiler
8029# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8030# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8031# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8033$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008034if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008036else
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008038#ifdef HAVE_SYS_TYPES_H
8039#include <sys/types.h>
8040#endif
8041
Matthias Kloseb9621712010-04-24 17:59:49 +00008042"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008043
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 if test "$ac_cv_type_off_t" = yes; then
8046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008048as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008049See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008050 else
8051 ac_cv_sizeof_off_t=0
8052 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8057$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008059
8060
Martin v. Löwis11437992002-04-12 09:54:03 +00008061cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008062#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008063_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008064
Michael W. Hudson54241132001-12-07 15:38:26 +00008065
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8068$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008069if test "$have_long_long" = yes
8070then
8071if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008072 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008073
Matthias Kloseb9621712010-04-24 17:59:49 +00008074$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8077$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008081fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008085fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008087# The cast to long int works around a bug in the HP C Compiler
8088# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8089# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8090# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8092$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008093if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008097#ifdef HAVE_SYS_TYPES_H
8098#include <sys/types.h>
8099#endif
8100#ifdef HAVE_TIME_H
8101#include <time.h>
8102#endif
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 if test "$ac_cv_type_time_t" = yes; then
8108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008110as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008111See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008112 else
8113 ac_cv_sizeof_time_t=0
8114 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8119$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008121
8122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008124#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008125_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008126
Michael W. Hudson54241132001-12-07 15:38:26 +00008127
8128
Trent Mick635f6fb2000-08-23 21:33:05 +00008129# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008130ac_save_cc="$CC"
8131if test "$ac_cv_kpthread" = "yes"
8132then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008133elif test "$ac_cv_kthread" = "yes"
8134then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008135elif test "$ac_cv_pthread" = "yes"
8136then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008137fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008138
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8140$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008141have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008143/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008144
8145 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008146int
8147main ()
8148{
Guido van Rossum12580492000-09-24 16:47:19 +00008149pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ;
8151 return 0;
8152}
Matthias Kloseb159a552010-04-25 21:00:44 +00008153
Martin v. Löwis11437992002-04-12 09:54:03 +00008154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008155if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008156 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8160$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008161if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8165# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8167$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172#ifdef HAVE_PTHREAD_H
8173#include <pthread.h>
8174#endif
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008178else
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 if test "$ac_cv_type_pthread_t" = yes; then
8180 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008182as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008183See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184 else
8185 ac_cv_sizeof_pthread_t=0
8186 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008188
Trent Mick635f6fb2000-08-23 21:33:05 +00008189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8191$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008193
8194
Martin v. Löwis11437992002-04-12 09:54:03 +00008195cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008196#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008197_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008199
Trent Mick635f6fb2000-08-23 21:33:05 +00008200fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008201CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008202
Michael W. Hudson54241132001-12-07 15:38:26 +00008203
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008204case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008205 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008206 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8207 ;;
8208 Darwin/*)
8209 OTHER_LIBTOOL_OPT=""
8210 ;;
8211esac
8212
8213
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008214ARCH_RUN_32BIT=""
8215
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008216case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008217 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008218 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8219 if test "${enable_universalsdk}"; then
8220 :
8221 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008222 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008223 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008224 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008225 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008226 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008227 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008228 if test ${gcc_version} '<' 4.0
8229 then
8230 LIBTOOL_CRUFT="-lcc_dynamic"
8231 else
8232 LIBTOOL_CRUFT=""
8233 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008235 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008238/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008239
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008240 #include <unistd.h>
8241 int main(int argc, char*argv[])
8242 {
8243 if (sizeof(long) == 4) {
8244 return 0;
8245 } else {
8246 return 1;
8247 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008248 }
8249
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008252 ac_osx_32bit=yes
8253else
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008258fi
8259
8260
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008261 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008262 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008263 i386)
8264 MACOSX_DEFAULT_ARCH="i386"
8265 ;;
8266 ppc)
8267 MACOSX_DEFAULT_ARCH="ppc"
8268 ;;
8269 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008270 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008271 ;;
8272 esac
8273 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008274 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008275 i386)
8276 MACOSX_DEFAULT_ARCH="x86_64"
8277 ;;
8278 ppc)
8279 MACOSX_DEFAULT_ARCH="ppc64"
8280 ;;
8281 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008282 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008283 ;;
8284 esac
8285
8286 #ARCH_RUN_32BIT="true"
8287 fi
8288
8289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008292esac
8293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8295$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008296if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008297then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008298 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008300 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8305$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008306 if test $enable_shared = "yes"
8307 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008308 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 +00008309 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8312$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008313fi
8314
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8316$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008317case $ac_sys_system/$ac_sys_release in
8318 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8323$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008324 ;;
8325 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8327$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008328 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008329esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008330
Guido van Rossum0a516c91994-09-12 10:58:40 +00008331# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008332
Michael W. Hudson54241132001-12-07 15:38:26 +00008333
8334
8335
8336
Benjamin Peterson99f03762010-04-11 22:15:28 +00008337
Thomas Wouters477c8d52006-05-27 19:21:47 +00008338
Georg Brandlb1441c72009-01-03 22:33:39 +00008339
Thomas Wouters477c8d52006-05-27 19:21:47 +00008340cat >>confdefs.h <<_ACEOF
8341#define SHLIB_EXT "$SO"
8342_ACEOF
8343
Guido van Rossum0a516c91994-09-12 10:58:40 +00008344# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008345# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008346# (Shared libraries in this instance are shared modules to be loaded into
8347# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8349$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008350if test -z "$LDSHARED"
8351then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008352 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008353 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008354 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008355 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008356 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008357 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008358 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008360 if test "$GCC" = "yes" ; then
8361 LDSHARED='$(CC) -shared'
8362 LDCXXSHARED='$(CXX) -shared'
8363 else
8364 LDSHARED='$(CC) -G'
8365 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008366 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008367 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008368 if test "$GCC" = "yes" ; then
8369 LDSHARED='$(CC) -shared'
8370 LDCXXSHARED='$(CXX) -shared'
8371 else
8372 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008373 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008374 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008375 LDSHARED='$(CC) -bundle'
8376 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008377 if test "$enable_framework" ; then
8378 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008379 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8380 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008381 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008382 else
8383 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008384 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008385 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008386 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008387 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008388 LDSHARED='$(CC) -bundle'
8389 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008390 if test "$enable_framework" ; then
8391 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008392 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8393 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008394 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008395 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008396 # No framework, use the Python app as bundle-loader
8397 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008398 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008399 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008400 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008401 Darwin/*)
8402 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8403 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008404
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008405 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008406 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008407 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008408 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008409 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008410 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8411 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008412 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008413 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008414 LDSHARED='$(CC) -bundle'
8415 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008416 if test "$enable_framework" ; then
8417 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008418 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8419 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008420 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008421 else
8422 # No framework, use the Python app as bundle-loader
8423 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8424 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008425 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008426 fi
8427 fi
8428 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008429 Linux*|GNU*|QNX*)
8430 LDSHARED='$(CC) -shared'
8431 LDCXXSHARED='$(CXX) -shared';;
8432 BSD/OS*/4*)
8433 LDSHARED="gcc -shared"
8434 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008435 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008436 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008437 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008438 LDSHARED='$(CC) -shared'
8439 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008440 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008441 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008442 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008443 OpenBSD*)
8444 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8445 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008446 LDSHARED='$(CC) -shared $(CCSHARED)'
8447 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008448 else
8449 case `uname -r` in
8450 [01].* | 2.[0-7] | 2.[0-7].*)
8451 LDSHARED="ld -Bshareable ${LDFLAGS}"
8452 ;;
8453 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008454 LDSHARED='$(CC) -shared $(CCSHARED)'
8455 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008456 ;;
8457 esac
8458 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008459 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008460 LDSHARED='$(CC) -shared'
8461 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008462 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008463 if test "$GCC" = "yes" ; then
8464 LDSHARED='$(CC) -shared'
8465 LDCXXSHARED='$(CXX) -shared'
8466 else
8467 LDSHARED='$(CC) -G'
8468 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008469 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008470 SCO_SV*)
8471 LDSHARED='$(CC) -Wl,-G,-Bexport'
8472 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8473 CYGWIN*)
8474 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8475 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008476 *) LDSHARED="ld";;
8477 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8480$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008481LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008482BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008483# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008484# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8486$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008487if test -z "$CCSHARED"
8488then
Guido van Rossum07397971997-04-29 21:49:50 +00008489 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008490 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008491 then CCSHARED="-fPIC";
8492 elif test `uname -p` = sparc;
8493 then CCSHARED="-xcode=pic32";
8494 else CCSHARED="-Kpic";
8495 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008496 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008497 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008498 else CCSHARED="+z";
8499 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008500 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008501 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008502 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008503 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008504 if test "$GCC" = "yes"
8505 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008506 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008507 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008508 SCO_SV*)
8509 if test "$GCC" = "yes"
8510 then CCSHARED="-fPIC"
8511 else CCSHARED="-Kpic -belf"
8512 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008513 IRIX*/6*) case $CC in
8514 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008515 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008516 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008517 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8520$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008521# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008522# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8524$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525if test -z "$LINKFORSHARED"
8526then
Guido van Rossum07397971997-04-29 21:49:50 +00008527 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008528 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008529 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008530 LINKFORSHARED="-Wl,-E -Wl,+s";;
8531# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008532 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008533 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008534 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008536 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008537 if test "$enable_framework"
8538 then
Jack Jansenda49e192005-01-07 13:08:22 +00008539 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008540 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008541 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008542 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008543 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008544 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008545 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008546 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8547 then
8548 LINKFORSHARED="-Wl,--export-dynamic"
8549 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008550 SunOS/5*) case $CC in
8551 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008552 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008553 then
8554 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008555 fi;;
8556 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008557 CYGWIN*)
8558 if test $enable_shared = "no"
8559 then
8560 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8561 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008562 QNX*)
8563 # -Wl,-E causes the symbols to be added to the dynamic
8564 # symbol table so that they can be found when a module
8565 # is loaded. -N 2048K causes the stack size to be set
8566 # to 2048 kilobytes so that the stack doesn't overflow
8567 # when running test_compile.py.
8568 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8572$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008573
Michael W. Hudson54241132001-12-07 15:38:26 +00008574
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008575
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8577$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008578if test ! "$LIBRARY" = "$LDLIBRARY"
8579then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008580 case $ac_sys_system in
8581 CYGWIN*)
8582 # Cygwin needs CCSHARED when building extension DLLs
8583 # but not when building the interpreter DLL.
8584 CFLAGSFORSHARED='';;
8585 *)
8586 CFLAGSFORSHARED='$(CCSHARED)'
8587 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8590$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008591
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008592# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8593# library (with --enable-shared).
8594# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008595# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8596# if it is not required, since it creates a dependency of the shared library
8597# to LIBS. This, in turn, means that applications linking the shared libpython
8598# don't need to link LIBS explicitly. The default should be only changed
8599# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008600
Matthias Kloseb9621712010-04-24 17:59:49 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8602$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008603case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008604 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008605 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008606esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8608$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008609
8610
Guido van Rossum627b2d71993-12-24 10:39:16 +00008611# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8613$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008615 $as_echo_n "(cached) " >&6
8616else
8617 ac_check_lib_save_LIBS=$LIBS
8618LIBS="-lsendfile $LIBS"
8619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620/* end confdefs.h. */
8621
8622/* Override any GCC internal prototype to avoid an error.
8623 Use char because int might match the return type of a GCC
8624 builtin and then its argument prototype would still apply. */
8625#ifdef __cplusplus
8626extern "C"
8627#endif
8628char sendfile ();
8629int
8630main ()
8631{
8632return sendfile ();
8633 ;
8634 return 0;
8635}
8636_ACEOF
8637if ac_fn_c_try_link "$LINENO"; then :
8638 ac_cv_lib_sendfile_sendfile=yes
8639else
8640 ac_cv_lib_sendfile_sendfile=no
8641fi
8642rm -f core conftest.err conftest.$ac_objext \
8643 conftest$ac_exeext conftest.$ac_ext
8644LIBS=$ac_check_lib_save_LIBS
8645fi
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8647$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008649 cat >>confdefs.h <<_ACEOF
8650#define HAVE_LIBSENDFILE 1
8651_ACEOF
8652
8653 LIBS="-lsendfile $LIBS"
8654
8655fi
8656
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8658$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008659if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008663LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667/* Override any GCC internal prototype to avoid an error.
8668 Use char because int might match the return type of a GCC
8669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008670#ifdef __cplusplus
8671extern "C"
8672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008673char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
8676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687rm -f core conftest.err conftest.$ac_objext \
8688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8692$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 cat >>confdefs.h <<_ACEOF
8695#define HAVE_LIBDL 1
8696_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008697
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008698 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008699
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008700fi
8701 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8703$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706else
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008708LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712/* Override any GCC internal prototype to avoid an error.
8713 Use char because int might match the return type of a GCC
8714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715#ifdef __cplusplus
8716extern "C"
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ;
8724 return 0;
8725}
8726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732rm -f core conftest.err conftest.$ac_objext \
8733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008734LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8737$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 cat >>confdefs.h <<_ACEOF
8740#define HAVE_LIBDLD 1
8741_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008743 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008745fi
8746 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008747
Georg Brandlb1441c72009-01-03 22:33:39 +00008748# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008749if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8751$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008752if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008754else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008755 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759/* Override any GCC internal prototype to avoid an error.
8760 Use char because int might match the return type of a GCC
8761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762#ifdef __cplusplus
8763extern "C"
8764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008765char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ;
8771 return 0;
8772}
8773_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774for ac_lib in '' pthread rt posix4; do
8775 if test -z "$ac_lib"; then
8776 ac_res="none required"
8777 else
8778 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784rm -f core conftest.err conftest.$ac_objext \
8785 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008786 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789done
Victor Stinnere0be4232011-10-25 13:06:09 +02008790if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792else
8793 ac_cv_search_sem_init=no
8794fi
8795rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008796LIBS=$ac_func_search_save_LIBS
8797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8799$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008801if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008803
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008804fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008805 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008806 # posix4 on Solaris 2.6
8807 # pthread (first!) on Linux
8808fi
8809
Martin v. Löwis19d17342003-06-14 21:03:05 +00008810# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8812$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008815else
8816 ac_check_lib_save_LIBS=$LIBS
8817LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821/* Override any GCC internal prototype to avoid an error.
8822 Use char because int might match the return type of a GCC
8823 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008824#ifdef __cplusplus
8825extern "C"
8826#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008827char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008828int
8829main ()
8830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008832 ;
8833 return 0;
8834}
8835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008837 ac_cv_lib_intl_textdomain=yes
8838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008843LIBS=$ac_check_lib_save_LIBS
8844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8846$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008847if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008850
Brett Cannonc6d936e2009-06-07 20:09:53 +00008851 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008852fi
8853
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008854
8855# checks for system dependent C++ extensions support
8856case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8858$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Georg Brandl59e87bd2011-02-15 19:48:59 +00008862 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008863int
8864main ()
8865{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008866loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ;
8868 return 0;
8869}
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008873
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
Matthias Kloseb159a552010-04-25 21:00:44 +00008877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008878$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008880else
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008883$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008884
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886rm -f core conftest.err conftest.$ac_objext \
8887 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008888 *) ;;
8889esac
8890
Guido van Rossum70c7f481998-03-26 18:44:10 +00008891# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8893$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008894if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008896else
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008898LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902/* Override any GCC internal prototype to avoid an error.
8903 Use char because int might match the return type of a GCC
8904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008905#ifdef __cplusplus
8906extern "C"
8907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008908char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008909int
8910main ()
8911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ;
8914 return 0;
8915}
8916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008924LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8927$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008928if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008929 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008930fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008931 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8933$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008934if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008936else
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008938LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942/* Override any GCC internal prototype to avoid an error.
8943 Use char because int might match the return type of a GCC
8944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008945#ifdef __cplusplus
8946extern "C"
8947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008948char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ;
8954 return 0;
8955}
8956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008959else
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962rm -f core conftest.err conftest.$ac_objext \
8963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008964LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8967$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008968if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008969 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008970fi
8971 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008972
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8974$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008977if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8980$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008981LIBS="$withval $LIBS"
8982
8983else
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986fi
8987
Guido van Rossum7f43da71994-08-01 12:15:30 +00008988
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008989if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008990 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8991set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8993$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008994if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008996else
8997 case $PKG_CONFIG in
8998 [\\/]* | ?:[\\/]*)
8999 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9000 ;;
9001 *)
9002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9003for as_dir in $PATH
9004do
9005 IFS=$as_save_IFS
9006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04009008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009009 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009011 break 2
9012 fi
9013done
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009015IFS=$as_save_IFS
9016
9017 ;;
9018esac
9019fi
9020PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9021if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9023$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009024else
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9026$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009027fi
9028
9029
9030fi
9031if test -z "$ac_cv_path_PKG_CONFIG"; then
9032 ac_pt_PKG_CONFIG=$PKG_CONFIG
9033 # Extract the first word of "pkg-config", so it can be a program name with args.
9034set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9036$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009037if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009039else
9040 case $ac_pt_PKG_CONFIG in
9041 [\\/]* | ?:[\\/]*)
9042 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9043 ;;
9044 *)
9045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9046for as_dir in $PATH
9047do
9048 IFS=$as_save_IFS
9049 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04009051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009052 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009054 break 2
9055 fi
9056done
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009058IFS=$as_save_IFS
9059
9060 ;;
9061esac
9062fi
9063ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9064if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9066$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009067else
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009070fi
9071
9072 if test "x$ac_pt_PKG_CONFIG" = x; then
9073 PKG_CONFIG=""
9074 else
9075 case $cross_compiling:$ac_tool_warned in
9076yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009079ac_tool_warned=yes ;;
9080esac
9081 PKG_CONFIG=$ac_pt_PKG_CONFIG
9082 fi
9083else
9084 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9085fi
9086
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009087
9088# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9090$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009091
9092# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009093if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009094 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009095else
9096 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009097fi
9098
9099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9101$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009102
9103# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9105$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009106
9107# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009108if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009109 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009110else
9111 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009112fi
9113
9114
9115if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009116 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9117else
9118 LIBFFI_INCLUDEDIR=""
9119fi
9120
9121
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9123$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009124
Stefan Krah60187b52012-03-23 19:06:27 +01009125# Check for use of the system libmpdec library
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9127$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9128
9129# Check whether --with-system_libmpdec was given.
9130if test "${with_system_libmpdec+set}" = set; then :
9131 withval=$with_system_libmpdec;
9132else
9133 with_system_libmpdec="no"
9134fi
9135
9136
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9138$as_echo "$with_system_libmpdec" >&6; }
9139
Benjamin Peterson076ed002010-10-31 17:11:02 +00009140# Check for support for loadable sqlite extensions
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9142$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9143# Check whether --enable-loadable-sqlite-extensions was given.
9144if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9145 enableval=$enable_loadable_sqlite_extensions;
9146else
9147 enable_loadable_sqlite_extensions="no"
9148fi
9149
9150
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9152$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9153
Matthias Klose55708cc2009-04-30 08:06:49 +00009154# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9156$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009157
9158# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009160 withval=$with_dbmliborder;
9161if test x$with_dbmliborder = xyes
9162then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009163as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009164else
9165 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9166 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9167 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009168 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009169 fi
9170 done
9171fi
9172fi
9173
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9175$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009176
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009177# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009178
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9181$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 withval=$with_signal_module;
9186fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009187
9188
9189if test -z "$with_signal_module"
9190then with_signal_module="yes"
9191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9193$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009194
9195if test "${with_signal_module}" = "yes"; then
9196 USE_SIGNAL_MODULE=""
9197 SIGNAL_OBJS=""
9198else
9199 USE_SIGNAL_MODULE="#"
9200 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9201fi
9202
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009203# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009204
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009205USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
9209# Templates for things AC_DEFINEd more than once.
9210# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009211
9212
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9215$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009218if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009219 withval=$with_threads;
9220fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009221
9222
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009223# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 withval=$with_thread; with_threads=$with_thread
9228fi
9229
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009230
9231if test -z "$with_threads"
9232then with_threads="yes"
9233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9235$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009236
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009237
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009238if test "$with_threads" = "no"
9239then
9240 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009241elif test "$ac_cv_pthread_is_default" = yes
9242then
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009244
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009245 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009247
9248 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009250elif test "$ac_cv_kpthread" = "yes"
9251then
9252 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009253 if test "$ac_cv_cxx_thread" = "yes"; then
9254 CXX="$CXX -Kpthread"
9255 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009258 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009259 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009260elif test "$ac_cv_kthread" = "yes"
9261then
9262 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009263 if test "$ac_cv_cxx_thread" = "yes"; then
9264 CXX="$CXX -Kthread"
9265 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009267
9268 posix_threads=yes
9269 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009270elif test "$ac_cv_pthread" = "yes"
9271then
9272 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009273 if test "$ac_cv_cxx_thread" = "yes"; then
9274 CXX="$CXX -pthread"
9275 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009277
9278 posix_threads=yes
9279 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009280else
9281 if test ! -z "$with_threads" -a -d "$with_threads"
9282 then LDFLAGS="$LDFLAGS -L$with_threads"
9283 fi
9284 if test ! -z "$withval" -a -d "$withval"
9285 then LDFLAGS="$LDFLAGS -L$withval"
9286 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009287
9288 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009289 # define _POSIX_THREADS in unistd.h. Some apparently don't
9290 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9292$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009294/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009295
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009296#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009297#ifdef _POSIX_THREADS
9298yes
9299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
9301_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009304 unistd_defines_pthreads=yes
9305else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009306 unistd_defines_pthreads=no
9307fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009308rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9311$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009314
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009315 # Just looking for pthread_create in libpthread is not enough:
9316 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9317 # So we really have to include pthread.h, and then link.
9318 _libs=$LIBS
9319 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9321$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009323/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009324#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009325
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009326void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009327int
9328main ()
9329{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009330
9331pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 ;
9333 return 0;
9334}
9335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009336if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9339$as_echo "yes" >&6; }
9340 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009341
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009342 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009343 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009344else
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009346 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009348if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009350
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009351 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009352 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009353else
Guido van Rossumad678af1998-10-02 14:42:15 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9356$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009357if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009359else
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009361LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365/* Override any GCC internal prototype to avoid an error.
9366 Use char because int might match the return type of a GCC
9367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368#ifdef __cplusplus
9369extern "C"
9370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009371char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009372int
9373main ()
9374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ;
9377 return 0;
9378}
9379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385rm -f core conftest.err conftest.$ac_objext \
9386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009387LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9390$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009391if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009394 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009395 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009396 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009397else
Greg Steinadf63d62000-07-05 10:38:09 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9400$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009401if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009403else
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009405LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409/* Override any GCC internal prototype to avoid an error.
9410 Use char because int might match the return type of a GCC
9411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009412#ifdef __cplusplus
9413extern "C"
9414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009415char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009416int
9417main ()
9418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ;
9421 return 0;
9422}
9423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009429rm -f core conftest.err conftest.$ac_objext \
9430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9434$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009435if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009437
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009438 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009439 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009440 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009441else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009442
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9444$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009447else
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009449LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453/* Override any GCC internal prototype to avoid an error.
9454 Use char because int might match the return type of a GCC
9455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456#ifdef __cplusplus
9457extern "C"
9458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009459char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009460int
9461main ()
9462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ;
9465 return 0;
9466}
9467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009475LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9478$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009481
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009482 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009483 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009484 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009485else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9488$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009491else
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009493LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497/* Override any GCC internal prototype to avoid an error.
9498 Use char because int might match the return type of a GCC
9499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009500#ifdef __cplusplus
9501extern "C"
9502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009503char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009504int
9505main ()
9506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ;
9509 return 0;
9510}
9511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009514else
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009517rm -f core conftest.err conftest.$ac_objext \
9518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009519LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9522$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009523if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009525
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009526 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009527 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009528 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009529else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009530
Martin v. Löwis130fb172001-07-19 11:00:41 +00009531 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009532fi
9533
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009535fi
9536
Guido van Rossum0be3e491997-05-22 20:33:33 +00009537fi
9538
Guido van Rossum49545951997-12-02 19:28:29 +00009539fi
9540
Guido van Rossumb93a8621998-05-07 13:27:32 +00009541fi
9542
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009544rm -f core conftest.err conftest.$ac_objext \
9545 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9548$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009549if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009550 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551else
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009553LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557/* Override any GCC internal prototype to avoid an error.
9558 Use char because int might match the return type of a GCC
9559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009560#ifdef __cplusplus
9561extern "C"
9562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009563char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564int
9565main ()
9566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ;
9569 return 0;
9570}
9571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574else
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009577rm -f core conftest.err conftest.$ac_objext \
9578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009579LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9582$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009583if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009585
Martin v. Löwis130fb172001-07-19 11:00:41 +00009586 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009587 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009588 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009589fi
9590
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009591
Neal Norwitza978ab02002-11-02 16:58:05 +00009592 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9594$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009595if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009597else
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009599LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603/* Override any GCC internal prototype to avoid an error.
9604 Use char because int might match the return type of a GCC
9605 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606#ifdef __cplusplus
9607extern "C"
9608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009609char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009610int
9611main ()
9612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ;
9615 return 0;
9616}
9617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009618if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009620else
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009623rm -f core conftest.err conftest.$ac_objext \
9624 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009625LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9628$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009629if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009631
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009632 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009633 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009634 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009635fi
9636
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009637 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009638fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009639
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009640if test "$posix_threads" = "yes"; then
9641 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009642
Matthias Kloseb9621712010-04-24 17:59:49 +00009643$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644
9645 fi
9646
9647 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9648 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009649 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009651
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652 ;;
9653 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009654$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009655
9656 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009657 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009659
9660 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661 esac
9662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9664$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669 ac_cv_pthread_system_supported=no
9670else
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673#include <pthread.h>
9674 void *foo(void *parm) {
9675 return NULL;
9676 }
9677 main() {
9678 pthread_attr_t attr;
9679 pthread_t id;
9680 if (pthread_attr_init(&attr)) exit(-1);
9681 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9682 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9683 exit(0);
9684 }
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009687 ac_cv_pthread_system_supported=yes
9688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695
Guido van Rossum627b2d71993-12-24 10:39:16 +00009696fi
9697
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9699$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700 if test "$ac_cv_pthread_system_supported" = "yes"; then
9701
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009703
9704 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 for ac_func in pthread_sigmask
9706do :
9707 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009708if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009710#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009712 case $ac_sys_system in
9713 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714
Matthias Kloseb9621712010-04-24 17:59:49 +00009715$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009716
9717 ;;
9718 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009719fi
9720done
9721
9722fi
9723
9724
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009725# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9728$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009730if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009732 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735 ipv6=no
9736 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9738$as_echo "yes" >&6; }
9739 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009740
9741 ipv6=yes
9742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009744else
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009750 ipv6=no
9751
9752else
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009755 /* AF_INET6 available check */
9756#include <sys/types.h>
9757#include <sys/socket.h>
9758main()
9759{
9760 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9761 exit(1);
9762 else
9763 exit(0);
9764}
9765
Martin v. Löwis11437992002-04-12 09:54:03 +00009766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009768
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9770$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009771 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009773else
Matthias Kloseb159a552010-04-25 21:00:44 +00009774
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009777 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782fi
9783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009785if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9787$as_echo_n "checking if RFC2553 API is available... " >&6; }
9788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009789/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009790
9791 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009792#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009793int
9794main ()
9795{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009796struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009797 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ;
9799 return 0;
9800}
Matthias Kloseb159a552010-04-25 21:00:44 +00009801
Martin v. Löwis11437992002-04-12 09:54:03 +00009802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009803if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009804
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009806$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009807 ipv6=yes
9808
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009809else
Matthias Kloseb159a552010-04-25 21:00:44 +00009810
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009812$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009813 ipv6=no
9814
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009817fi
9818
9819if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009821
9822fi
9823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824fi
9825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826
9827ipv6type=unknown
9828ipv6lib=none
9829ipv6trylibc=no
9830
9831if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9833$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009834 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9835 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836 case $i in
9837 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009841#include <netinet/in.h>
9842#ifdef IPV6_INRIA_VERSION
9843yes
9844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009848 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009849fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009850rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851
9852 ;;
9853 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009857#include <netinet/in.h>
9858#ifdef __KAME__
9859yes
9860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009861_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009864 ipv6type=$i;
9865 ipv6lib=inet6
9866 ipv6libdir=/usr/local/v6/lib
9867 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009868fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009869rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870
9871 ;;
9872 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876#include <features.h>
9877#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9878yes
9879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009883 ipv6type=$i;
9884 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009886rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887
9888 ;;
9889 linux-inet6)
9890 if test -d /usr/inet6; then
9891 ipv6type=$i
9892 ipv6lib=inet6
9893 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009894 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895 fi
9896 ;;
9897 solaris)
9898 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009899 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009900 ipv6type=$i
9901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902 fi
9903 fi
9904 ;;
9905 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909#include <sys/param.h>
9910#ifdef _TOSHIBA_INET6
9911yes
9912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916 ipv6type=$i;
9917 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009918 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009920rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921
9922 ;;
9923 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927#include </usr/local/v6/include/sys/v6config.h>
9928#ifdef __V6D__
9929yes
9930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934 ipv6type=$i;
9935 ipv6lib=v6;
9936 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009937 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009940
9941 ;;
9942 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946#include <sys/param.h>
9947#ifdef _ZETA_MINAMI_INET6
9948yes
9949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953 ipv6type=$i;
9954 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009955 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958
9959 ;;
9960 esac
9961 if test "$ipv6type" != "unknown"; then
9962 break
9963 fi
9964 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9966$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967fi
9968
9969if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9970 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9971 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9972 echo "using lib$ipv6lib"
9973 else
9974 if test $ipv6trylibc = "yes"; then
9975 echo "using libc"
9976 else
9977 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9978 echo "You need to fetch lib$ipv6lib.a from appropriate"
9979 echo 'ipv6 kit and compile beforehand.'
9980 exit 1
9981 fi
9982 fi
9983fi
9984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9986$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009988/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009989
9990 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009991int
9992main ()
9993{
9994FSIORefNum fRef = 0
9995 ;
9996 return 0;
9997}
Matthias Kloseb159a552010-04-25 21:00:44 +00009998
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010001
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
Matthias Kloseb9621712010-04-24 17:59:49 +000010003$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10006$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010007
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010008else
Matthias Kloseb159a552010-04-25 21:00:44 +000010009
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010012
10013fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10015
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010016# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10018$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010021if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022 withval=$with_doc_strings;
10023fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010024
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010025
10026if test -z "$with_doc_strings"
10027then with_doc_strings="yes"
10028fi
10029if test "$with_doc_strings" != "no"
10030then
10031
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010033
10034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10036$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010037
Antoine Pitrou042b1282010-08-13 21:15:58 +000010038# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10040$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010043if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010045if test "$withval" != no
10046then
10047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10051$as_echo "yes" >&6; }
10052else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010054fi
10055else
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058fi
10059
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010060
10061# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10063$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010066if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067 withval=$with_pymalloc;
10068fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010069
Neil Schemenauera35c6882001-02-27 04:45:05 +000010070
Neil Schemenauer16c22972002-03-22 15:34:49 +000010071if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010072then
10073 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010074fi
10075if test "$with_pymalloc" != "no"
10076then
Martin v. Löwis11437992002-04-12 09:54:03 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010079
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010080 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10083$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010084
Benjamin Peterson05159c42009-12-03 03:01:27 +000010085# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10087$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010088
10089# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010090if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010091 withval=$with_valgrind;
10092else
10093 with_valgrind=no
10094fi
10095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10097$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010098if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 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 +020010100if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010103
10104else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010105 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010106
10107fi
10108
10109
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010110 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010111fi
10112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010113# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010114
Guido van Rossum98935bf2001-09-05 19:13:16 +000010115DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010116
Guido van Rossume97ee181999-12-20 21:27:22 +000010117# the dlopen() function means we might want to use dynload_shlib.o. some
10118# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010119for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010120do :
10121 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010122if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010124#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010126
Guido van Rossume97ee181999-12-20 21:27:22 +000010127fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010128done
Guido van Rossume97ee181999-12-20 21:27:22 +000010129
Michael W. Hudson54241132001-12-07 15:38:26 +000010130
Guido van Rossume97ee181999-12-20 21:27:22 +000010131# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10132# loading of modules.
10133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10135$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010136if test -z "$DYNLOADFILE"
10137then
10138 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010139 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10140 if test "$ac_cv_func_dlopen" = yes
10141 then DYNLOADFILE="dynload_shlib.o"
10142 else DYNLOADFILE="dynload_aix.o"
10143 fi
10144 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010145 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010146 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10147 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010148 *)
10149 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10150 # out any dynamic loading
10151 if test "$ac_cv_func_dlopen" = yes
10152 then DYNLOADFILE="dynload_shlib.o"
10153 else DYNLOADFILE="dynload_stub.o"
10154 fi
10155 ;;
10156 esac
10157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10159$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010160if test "$DYNLOADFILE" != "dynload_stub.o"
10161then
Martin v. Löwis11437992002-04-12 09:54:03 +000010162
Matthias Kloseb9621712010-04-24 17:59:49 +000010163$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010164
10165fi
10166
Neil Schemenauer4e425612001-06-19 15:44:15 +000010167# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10168
Michael W. Hudson54241132001-12-07 15:38:26 +000010169
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10171$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010172if test -z "$MACHDEP_OBJS"
10173then
Jack Jansene578a632001-08-15 01:27:14 +000010174 MACHDEP_OBJS=$extra_machdep_objs
10175else
10176 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010177fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010178if test -z "$MACHDEP_OBJS"; then
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10180$as_echo "none" >&6; }
10181else
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10183$as_echo "$MACHDEP_OBJS" >&6; }
10184fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010185
Guido van Rossum627b2d71993-12-24 10:39:16 +000010186# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010187for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010188 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010189 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010190 futimens futimes gai_strerror \
10191 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010192 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010193 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010194 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10195 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010196 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010197 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010198 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010199 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010200 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010201 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010202 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10203 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010204 sigaction sigaltstack siginterrupt sigpending sigrelse \
10205 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010206 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010207 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10208 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010209do :
10210 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10211ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010212if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010214#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010215_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010217fi
10218done
10219
Michael W. Hudson54241132001-12-07 15:38:26 +000010220
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010221ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10222 #include <dirent.h>
10223"
10224if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10225
10226$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10227
10228fi
10229
10230
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010231# For some functions, having a definition is not sufficient, since
10232# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10234$as_echo_n "checking for chroot... " >&6; }
10235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010237#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010238int
10239main ()
10240{
10241void *x=chroot
10242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249
Matthias Kloseb159a552010-04-25 21:00:44 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010251$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252else
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010255
10256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10259$as_echo_n "checking for link... " >&6; }
10260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010262#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010263int
10264main ()
10265{
10266void *x=link
10267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010272
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274
Matthias Kloseb159a552010-04-25 21:00:44 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010276$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277else
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010280
10281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10284$as_echo_n "checking for symlink... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010287#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010288int
10289main ()
10290{
10291void *x=symlink
10292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
Matthias Kloseb159a552010-04-25 21:00:44 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010305
10306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10309$as_echo_n "checking for fchdir... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010312#include <unistd.h>
10313int
10314main ()
10315{
10316void *x=fchdir
10317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324
Matthias Kloseb159a552010-04-25 21:00:44 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010330
10331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10334$as_echo_n "checking for fsync... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010337#include <unistd.h>
10338int
10339main ()
10340{
10341void *x=fsync
10342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349
Matthias Kloseb159a552010-04-25 21:00:44 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010355
10356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10359$as_echo_n "checking for fdatasync... " >&6; }
10360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010362#include <unistd.h>
10363int
10364main ()
10365{
10366void *x=fdatasync
10367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
Matthias Kloseb159a552010-04-25 21:00:44 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010380
10381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10384$as_echo_n "checking for epoll... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010386/* end confdefs.h. */
10387#include <sys/epoll.h>
10388int
10389main ()
10390{
10391void *x=epoll_create
10392 ;
10393 return 0;
10394}
10395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010399
Matthias Kloseb159a552010-04-25 21:00:44 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010401$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010402else
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010405
10406fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10409$as_echo_n "checking for epoll_create1... " >&6; }
10410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411/* end confdefs.h. */
10412#include <sys/epoll.h>
10413int
10414main ()
10415{
10416void *x=epoll_create1
10417 ;
10418 return 0;
10419}
10420_ACEOF
10421if ac_fn_c_try_compile "$LINENO"; then :
10422
10423$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10424
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10426$as_echo "yes" >&6; }
10427else
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
10430
10431fi
10432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10434$as_echo_n "checking for kqueue... " >&6; }
10435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010436/* end confdefs.h. */
10437
10438#include <sys/types.h>
10439#include <sys/event.h>
10440
10441int
10442main ()
10443{
10444int x=kqueue()
10445 ;
10446 return 0;
10447}
10448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010452
Matthias Kloseb159a552010-04-25 21:00:44 +000010453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010454$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10457$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010458
10459fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010461# On some systems (eg. FreeBSD 5), we would find a definition of the
10462# functions ctermid_r, setgroups in the library, but no prototype
10463# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10464# address to avoid compiler warnings and potential miscompilations
10465# because of the missing prototypes.
10466
Matthias Kloseb9621712010-04-24 17:59:49 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10468$as_echo_n "checking for ctermid_r... " >&6; }
10469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010470/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010471
Martin v. Löwisd5843682002-11-21 20:41:28 +000010472#include <stdio.h>
10473
Martin v. Löwisd5843682002-11-21 20:41:28 +000010474int
10475main ()
10476{
10477void* p = ctermid_r
10478 ;
10479 return 0;
10480}
10481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010485
Matthias Kloseb159a552010-04-25 21:00:44 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010488else
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010491
10492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10494
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10496$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010497if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010498 $as_echo_n "(cached) " >&6
10499else
10500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010502#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010503int
10504main ()
10505{
10506void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010507
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010508 ;
10509 return 0;
10510}
10511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010512if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010513 ac_cv_flock_decl=yes
10514else
10515 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010516
10517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010519
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010520fi
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10522$as_echo "$ac_cv_flock_decl" >&6; }
10523if test "x${ac_cv_flock_decl}" = xyes; then
10524 for ac_func in flock
10525do :
10526 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010527if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010528 cat >>confdefs.h <<_ACEOF
10529#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010530_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010531
Antoine Pitroua3000072010-09-07 14:52:42 +000010532else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010534$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010535if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010536 $as_echo_n "(cached) " >&6
10537else
10538 ac_check_lib_save_LIBS=$LIBS
10539LIBS="-lbsd $LIBS"
10540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10541/* end confdefs.h. */
10542
10543/* Override any GCC internal prototype to avoid an error.
10544 Use char because int might match the return type of a GCC
10545 builtin and then its argument prototype would still apply. */
10546#ifdef __cplusplus
10547extern "C"
10548#endif
10549char flock ();
10550int
10551main ()
10552{
10553return flock ();
10554 ;
10555 return 0;
10556}
10557_ACEOF
10558if ac_fn_c_try_link "$LINENO"; then :
10559 ac_cv_lib_bsd_flock=yes
10560else
10561 ac_cv_lib_bsd_flock=no
10562fi
10563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
10565LIBS=$ac_check_lib_save_LIBS
10566fi
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10568$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010569if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010570 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010571
10572
10573$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10574
10575
10576fi
10577
10578
10579fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010580done
10581
Antoine Pitroua3000072010-09-07 14:52:42 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10585$as_echo_n "checking for getpagesize... " >&6; }
10586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010587/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010588
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010589#include <unistd.h>
10590
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010591int
10592main ()
10593{
10594void* p = getpagesize
10595 ;
10596 return 0;
10597}
10598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010600
Matthias Kloseb9621712010-04-24 17:59:49 +000010601$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010602
Matthias Kloseb159a552010-04-25 21:00:44 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010605else
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10607$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010608
10609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010611
Victor Stinner984890f2011-11-24 13:53:38 +010010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10613$as_echo_n "checking for broken unsetenv... " >&6; }
10614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615/* end confdefs.h. */
10616
10617#include <stdlib.h>
10618
10619int
10620main ()
10621{
10622int res = unsetenv("DUMMY")
10623 ;
10624 return 0;
10625}
10626_ACEOF
10627if ac_fn_c_try_compile "$LINENO"; then :
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630else
10631
10632$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10633
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10635$as_echo "yes" >&6; }
10636
10637fi
10638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10639
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010640for ac_prog in true
10641do
10642 # Extract the first word of "$ac_prog", so it can be a program name with args.
10643set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010646if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648else
10649 if test -n "$TRUE"; then
10650 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10651else
10652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10653for as_dir in $PATH
10654do
10655 IFS=$as_save_IFS
10656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -040010658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 $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 +000010661 break 2
10662 fi
10663done
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666
10667fi
10668fi
10669TRUE=$ac_cv_prog_TRUE
10670if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10672$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676fi
10677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679 test -n "$TRUE" && break
10680done
10681test -n "$TRUE" || TRUE="/bin/true"
10682
10683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10685$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010686if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688else
10689 ac_check_lib_save_LIBS=$LIBS
10690LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694/* Override any GCC internal prototype to avoid an error.
10695 Use char because int might match the return type of a GCC
10696 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010697#ifdef __cplusplus
10698extern "C"
10699#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010700char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010701int
10702main ()
10703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010710 ac_cv_lib_c_inet_aton=yes
10711else
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010714rm -f core conftest.err conftest.$ac_objext \
10715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716LIBS=$ac_check_lib_save_LIBS
10717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10719$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10724$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010725if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010727else
10728 ac_check_lib_save_LIBS=$LIBS
10729LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733/* Override any GCC internal prototype to avoid an error.
10734 Use char because int might match the return type of a GCC
10735 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010736#ifdef __cplusplus
10737extern "C"
10738#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010739char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010740int
10741main ()
10742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010744 ;
10745 return 0;
10746}
10747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749 ac_cv_lib_resolv_inet_aton=yes
10750else
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010753rm -f core conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755LIBS=$ac_check_lib_save_LIBS
10756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10758$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010759if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010760 cat >>confdefs.h <<_ACEOF
10761#define HAVE_LIBRESOLV 1
10762_ACEOF
10763
10764 LIBS="-lresolv $LIBS"
10765
10766fi
10767
10768
10769fi
10770
10771
Christian Heimesd0764e22007-12-04 15:00:33 +000010772# On Tru64, chflags seems to be present, but calling it will
10773# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10775$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010776if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010778else
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010780 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010783/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010784
Christian Heimesd0764e22007-12-04 15:00:33 +000010785#include <sys/stat.h>
10786#include <unistd.h>
10787int main(int argc, char*argv[])
10788{
10789 if(chflags(argv[0], 0) != 0)
10790 return 1;
10791 return 0;
10792}
Ned Deily3eb67d52011-06-28 00:00:28 -070010793
Christian Heimesd0764e22007-12-04 15:00:33 +000010794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010796 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010802fi
10803
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10807$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010808if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010810if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010811 ac_cv_have_chflags="yes"
10812else
10813 ac_cv_have_chflags="no"
10814fi
10815
10816fi
10817if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010820
10821fi
10822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10824$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010825if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010829 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010832/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010833
Christian Heimesd0764e22007-12-04 15:00:33 +000010834#include <sys/stat.h>
10835#include <unistd.h>
10836int main(int argc, char*argv[])
10837{
10838 if(lchflags(argv[0], 0) != 0)
10839 return 1;
10840 return 0;
10841}
Ned Deily3eb67d52011-06-28 00:00:28 -070010842
Christian Heimesd0764e22007-12-04 15:00:33 +000010843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010845 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010851fi
10852
10853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10856$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010857if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010859if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010860 ac_cv_have_lchflags="yes"
10861else
10862 ac_cv_have_lchflags="no"
10863fi
10864
10865fi
10866if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010869
10870fi
10871
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010872case $ac_sys_system/$ac_sys_release in
10873Darwin/*)
10874 _CUR_CFLAGS="${CFLAGS}"
10875 _CUR_LDFLAGS="${LDFLAGS}"
10876 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10877 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10878 ;;
10879esac
10880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10882$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010883if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010885else
10886 ac_check_lib_save_LIBS=$LIBS
10887LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010889/* end confdefs.h. */
10890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891/* Override any GCC internal prototype to avoid an error.
10892 Use char because int might match the return type of a GCC
10893 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010894#ifdef __cplusplus
10895extern "C"
10896#endif
10897char inflateCopy ();
10898int
10899main ()
10900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010902 ;
10903 return 0;
10904}
10905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010907 ac_cv_lib_z_inflateCopy=yes
10908else
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010911rm -f core conftest.err conftest.$ac_objext \
10912 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010913LIBS=$ac_check_lib_save_LIBS
10914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10916$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010917if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010920
10921fi
10922
10923
10924case $ac_sys_system/$ac_sys_release in
10925Darwin/*)
10926 CFLAGS="${_CUR_CFLAGS}"
10927 LDFLAGS="${_CUR_LDFLAGS}"
10928 ;;
10929esac
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10932$as_echo_n "checking for hstrerror... " >&6; }
10933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010934/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010935
Martin v. Löwise9416172003-05-03 10:12:45 +000010936#include <netdb.h>
10937
Martin v. Löwise9416172003-05-03 10:12:45 +000010938int
10939main ()
10940{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010941void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010949
Matthias Kloseb159a552010-04-25 21:00:44 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010955
10956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010957rm -f core conftest.err conftest.$ac_objext \
10958 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10961$as_echo_n "checking for inet_aton... " >&6; }
10962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010964
Martin v. Löwis86d66262006-02-17 08:40:11 +000010965#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010966#include <sys/socket.h>
10967#include <netinet/in.h>
10968#include <arpa/inet.h>
10969
Martin v. Löwise9416172003-05-03 10:12:45 +000010970int
10971main ()
10972{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010973void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010974 ;
10975 return 0;
10976}
10977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010981
Matthias Kloseb159a552010-04-25 21:00:44 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010984else
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010987
10988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010989rm -f core conftest.err conftest.$ac_objext \
10990 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10993$as_echo_n "checking for inet_pton... " >&6; }
10994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010995/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010996
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010997#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010998#include <sys/socket.h>
10999#include <netinet/in.h>
11000#include <arpa/inet.h>
11001
Martin v. Löwise9416172003-05-03 10:12:45 +000011002int
11003main ()
11004{
11005void* p = inet_pton
11006 ;
11007 return 0;
11008}
11009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011013
Matthias Kloseb159a552010-04-25 21:00:44 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011016else
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011019
11020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011022
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011023# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11025$as_echo_n "checking for setgroups... " >&6; }
11026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011027/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011028
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011029#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011030#ifdef HAVE_GRP_H
11031#include <grp.h>
11032#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011033
Martin v. Löwisd5843682002-11-21 20:41:28 +000011034int
11035main ()
11036{
11037void* p = setgroups
11038 ;
11039 return 0;
11040}
11041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011045
Matthias Kloseb159a552010-04-25 21:00:44 +000011046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011051
11052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011054
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011055# check for openpty and forkpty
11056
11057for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011058do :
11059 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011060if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011063_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11067$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011068if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011070else
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011072LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076/* Override any GCC internal prototype to avoid an error.
11077 Use char because int might match the return type of a GCC
11078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011079#ifdef __cplusplus
11080extern "C"
11081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011082char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011083int
11084main ()
11085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 ;
11088 return 0;
11089}
11090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011091if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011093else
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011096rm -f core conftest.err conftest.$ac_objext \
11097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011098LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11101$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011102if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011104 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011105else
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11107$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011110else
11111 ac_check_lib_save_LIBS=$LIBS
11112LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011114/* end confdefs.h. */
11115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116/* Override any GCC internal prototype to avoid an error.
11117 Use char because int might match the return type of a GCC
11118 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011119#ifdef __cplusplus
11120extern "C"
11121#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011122char openpty ();
11123int
11124main ()
11125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011132 ac_cv_lib_bsd_openpty=yes
11133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011136rm -f core conftest.err conftest.$ac_objext \
11137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011138LIBS=$ac_check_lib_save_LIBS
11139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11141$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011144 LIBS="$LIBS -lbsd"
11145fi
11146
11147
11148fi
11149
Fred Drake8cef4cf2000-06-28 16:40:38 +000011150
11151fi
11152done
11153
11154for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011155do :
11156 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011157if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011161
Fred Drake8cef4cf2000-06-28 16:40:38 +000011162else
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11164$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011165if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011167else
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173/* Override any GCC internal prototype to avoid an error.
11174 Use char because int might match the return type of a GCC
11175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011176#ifdef __cplusplus
11177extern "C"
11178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011179char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011190else
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011193rm -f core conftest.err conftest.$ac_objext \
11194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011195LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11198$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011199if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011201 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11204$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011205if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011207else
11208 ac_check_lib_save_LIBS=$LIBS
11209LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011211/* end confdefs.h. */
11212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213/* Override any GCC internal prototype to avoid an error.
11214 Use char because int might match the return type of a GCC
11215 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011216#ifdef __cplusplus
11217extern "C"
11218#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011219char forkpty ();
11220int
11221main ()
11222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011229 ac_cv_lib_bsd_forkpty=yes
11230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011233rm -f core conftest.err conftest.$ac_objext \
11234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011235LIBS=$ac_check_lib_save_LIBS
11236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11238$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011239if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011241 LIBS="$LIBS -lbsd"
11242fi
11243
11244
11245fi
11246
Fred Drake8cef4cf2000-06-28 16:40:38 +000011247
11248fi
11249done
11250
Jack Jansendd19cf82001-12-06 22:36:17 +000011251
Christian Heimesb186d002008-03-18 15:15:01 +000011252# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011253for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011254do :
11255 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011256if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011259_ACEOF
11260
11261fi
11262done
11263
11264
Michael W. Hudson54241132001-12-07 15:38:26 +000011265# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011266for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011267do :
11268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11269ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011270if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011273_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011275fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011276done
11277
Michael W. Hudson54241132001-12-07 15:38:26 +000011278
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011279ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011281 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011282
Martin v. Löwis1142de32002-03-29 16:28:31 +000011283else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011285 *" dup2.$ac_objext "* ) ;;
11286 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011288esac
11289
Martin v. Löwis1142de32002-03-29 16:28:31 +000011290fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011291
11292ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011293if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011294 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11295
11296else
11297 case " $LIBOBJS " in
11298 *" getcwd.$ac_objext "* ) ;;
11299 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11300 ;;
11301esac
11302
11303fi
11304
11305ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011306if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011307 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11308
11309else
11310 case " $LIBOBJS " in
11311 *" strdup.$ac_objext "* ) ;;
11312 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11313 ;;
11314esac
11315
11316fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011317
11318
11319for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011320do :
11321 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011322if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011329int
11330main ()
11331{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011332getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
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 GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011340
Guido van Rossum627b2d71993-12-24 10:39:16 +000011341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011343
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011345done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011346
Jack Jansen150753c2003-03-29 22:07:47 +000011347for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011348do :
11349 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011350if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +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. */
Jack Jansen150753c2003-03-29 22:07:47 +000011356#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011357int
11358main ()
11359{
11360setpgrp(0,0);
11361 ;
11362 return 0;
11363}
11364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011368
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011371
11372fi
11373done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011374
Thomas Wouters3a584202000-08-05 23:28:51 +000011375for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011376do :
11377 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011378if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011384#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011385int
11386main ()
11387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
11394
Guido van Rossum627b2d71993-12-24 10:39:16 +000011395else
Skip Montanaro6dead952003-09-25 14:50:04 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399
Guido van Rossum627b2d71993-12-24 10:39:16 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011404done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011405
Michael W. Hudson54241132001-12-07 15:38:26 +000011406
Victor Stinnere0be4232011-10-25 13:06:09 +020011407for ac_func in clock_gettime
11408do :
11409 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11410if test "x$ac_cv_func_clock_gettime" = xyes; then :
11411 cat >>confdefs.h <<_ACEOF
11412#define HAVE_CLOCK_GETTIME 1
11413_ACEOF
11414
11415else
11416
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11418$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11419if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11420 $as_echo_n "(cached) " >&6
11421else
11422 ac_check_lib_save_LIBS=$LIBS
11423LIBS="-lrt $LIBS"
11424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11425/* end confdefs.h. */
11426
11427/* Override any GCC internal prototype to avoid an error.
11428 Use char because int might match the return type of a GCC
11429 builtin and then its argument prototype would still apply. */
11430#ifdef __cplusplus
11431extern "C"
11432#endif
11433char clock_gettime ();
11434int
11435main ()
11436{
11437return clock_gettime ();
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442if ac_fn_c_try_link "$LINENO"; then :
11443 ac_cv_lib_rt_clock_gettime=yes
11444else
11445 ac_cv_lib_rt_clock_gettime=no
11446fi
11447rm -f core conftest.err conftest.$ac_objext \
11448 conftest$ac_exeext conftest.$ac_ext
11449LIBS=$ac_check_lib_save_LIBS
11450fi
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11452$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11453if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11454
11455 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11456
11457
11458$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11459
11460
11461fi
11462
11463
11464fi
11465done
11466
11467
11468for ac_func in clock_getres
11469do :
11470 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11471if test "x$ac_cv_func_clock_getres" = xyes; then :
11472 cat >>confdefs.h <<_ACEOF
11473#define HAVE_CLOCK_GETRES 1
11474_ACEOF
11475
11476else
11477
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11479$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11480if ${ac_cv_lib_rt_clock_getres+:} false; then :
11481 $as_echo_n "(cached) " >&6
11482else
11483 ac_check_lib_save_LIBS=$LIBS
11484LIBS="-lrt $LIBS"
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486/* end confdefs.h. */
11487
11488/* Override any GCC internal prototype to avoid an error.
11489 Use char because int might match the return type of a GCC
11490 builtin and then its argument prototype would still apply. */
11491#ifdef __cplusplus
11492extern "C"
11493#endif
11494char clock_getres ();
11495int
11496main ()
11497{
11498return clock_getres ();
11499 ;
11500 return 0;
11501}
11502_ACEOF
11503if ac_fn_c_try_link "$LINENO"; then :
11504 ac_cv_lib_rt_clock_getres=yes
11505else
11506 ac_cv_lib_rt_clock_getres=no
11507fi
11508rm -f core conftest.err conftest.$ac_objext \
11509 conftest$ac_exeext conftest.$ac_ext
11510LIBS=$ac_check_lib_save_LIBS
11511fi
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11513$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11514if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11515
11516 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11517
11518
11519fi
11520
11521
11522fi
11523done
11524
11525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11527$as_echo_n "checking for major... " >&6; }
11528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011530
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011531#if defined(MAJOR_IN_MKDEV)
11532#include <sys/mkdev.h>
11533#elif defined(MAJOR_IN_SYSMACROS)
11534#include <sys/sysmacros.h>
11535#else
11536#include <sys/types.h>
11537#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011538
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011539int
11540main ()
11541{
11542
11543 makedev(major(0),minor(0));
11544
11545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011550
11551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11555$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011556
11557else
Skip Montanaro6dead952003-09-25 14:50:04 +000011558
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011561
11562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011563rm -f core conftest.err conftest.$ac_objext \
11564 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011565
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011566# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011567# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11569$as_echo_n "checking for getaddrinfo... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011572
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011573#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011574#include <sys/socket.h>
11575#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011576#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011577
Martin v. Löwis11437992002-04-12 09:54:03 +000011578int
11579main ()
11580{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011581getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ;
11583 return 0;
11584}
11585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011586if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011587 have_getaddrinfo=yes
11588else
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011591rm -f core conftest.err conftest.$ac_objext \
11592 conftest$ac_exeext conftest.$ac_ext
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11594$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011595if test $have_getaddrinfo = yes
11596then
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11598$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011599 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011601else
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011603
11604if test "${enable_ipv6+set}" = set; then
11605 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11606else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011607 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011608fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011612
11613#include <sys/types.h>
11614#include <netdb.h>
11615#include <string.h>
11616#include <sys/socket.h>
11617#include <netinet/in.h>
11618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011619int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011620{
11621 int passive, gaierr, inet4 = 0, inet6 = 0;
11622 struct addrinfo hints, *ai, *aitop;
11623 char straddr[INET6_ADDRSTRLEN], strport[16];
11624
11625 for (passive = 0; passive <= 1; passive++) {
11626 memset(&hints, 0, sizeof(hints));
11627 hints.ai_family = AF_UNSPEC;
11628 hints.ai_flags = passive ? AI_PASSIVE : 0;
11629 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011630 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011631 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11632 (void)gai_strerror(gaierr);
11633 goto bad;
11634 }
11635 for (ai = aitop; ai; ai = ai->ai_next) {
11636 if (ai->ai_addr == NULL ||
11637 ai->ai_addrlen == 0 ||
11638 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11639 straddr, sizeof(straddr), strport, sizeof(strport),
11640 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11641 goto bad;
11642 }
11643 switch (ai->ai_family) {
11644 case AF_INET:
11645 if (strcmp(strport, "54321") != 0) {
11646 goto bad;
11647 }
11648 if (passive) {
11649 if (strcmp(straddr, "0.0.0.0") != 0) {
11650 goto bad;
11651 }
11652 } else {
11653 if (strcmp(straddr, "127.0.0.1") != 0) {
11654 goto bad;
11655 }
11656 }
11657 inet4++;
11658 break;
11659 case AF_INET6:
11660 if (strcmp(strport, "54321") != 0) {
11661 goto bad;
11662 }
11663 if (passive) {
11664 if (strcmp(straddr, "::") != 0) {
11665 goto bad;
11666 }
11667 } else {
11668 if (strcmp(straddr, "::1") != 0) {
11669 goto bad;
11670 }
11671 }
11672 inet6++;
11673 break;
11674 case AF_UNSPEC:
11675 goto bad;
11676 break;
11677 default:
11678 /* another family support? */
11679 break;
11680 }
11681 }
11682 }
11683
11684 if (!(inet4 == 0 || inet4 == 2))
11685 goto bad;
11686 if (!(inet6 == 0 || inet6 == 2))
11687 goto bad;
11688
11689 if (aitop)
11690 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011691 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011692
11693 bad:
11694 if (aitop)
11695 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011696 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011697}
11698
Martin v. Löwis11437992002-04-12 09:54:03 +000011699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011701 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011709fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011710
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11714$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11715
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011716if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011717then
11718 if test $ipv6 = yes
11719 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720 echo 'Fatal: You must get working getaddrinfo() function.'
11721 echo ' or you can specify "--disable-ipv6"'.
11722 exit 1
11723 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011724else
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011727
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011728fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011729
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011730for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011731do :
11732 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011733if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011736_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011737
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738fi
11739done
11740
Michael W. Hudson54241132001-12-07 15:38:26 +000011741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011742# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11744$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750#include <sys/types.h>
11751#include <sys/time.h>
11752#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011753
Martin v. Löwis11437992002-04-12 09:54:03 +000011754int
11755main ()
11756{
11757if ((struct tm *) 0)
11758return 0;
11759 ;
11760 return 0;
11761}
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11771$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011772if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Matthias Kloseb9621712010-04-24 17:59:49 +000011774$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011775
11776fi
11777
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11779$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011780if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011784/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785#include <sys/types.h>
11786#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Martin v. Löwis11437992002-04-12 09:54:03 +000011788int
11789main ()
11790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791struct tm tm;
11792 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 ;
11795 return 0;
11796}
11797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011799 ac_cv_struct_tm=time.h
11800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11806$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011807if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810
11811fi
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813ac_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 +000011814#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816"
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
11819cat >>confdefs.h <<_ACEOF
11820#define HAVE_STRUCT_TM_TM_ZONE 1
11821_ACEOF
11822
11823
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011824fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011825
Martin v. Löwis11437992002-04-12 09:54:03 +000011826if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829
11830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11832"
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837fi
11838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841_ACEOF
11842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11844$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011845if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011850#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851#if !HAVE_DECL_TZNAME
11852extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
Martin v. Löwis11437992002-04-12 09:54:03 +000011855int
11856main ()
11857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011858return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011864 ac_cv_var_tzname=yes
11865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011868rm -f core conftest.err conftest.$ac_objext \
11869 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11872$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011873 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011876
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011877 fi
11878fi
11879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880ac_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 +020011881if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
11883cat >>confdefs.h <<_ACEOF
11884#define HAVE_STRUCT_STAT_ST_RDEV 1
11885_ACEOF
11886
11887
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011888fi
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890ac_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 +020011891if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011892
Martin v. Löwis11437992002-04-12 09:54:03 +000011893cat >>confdefs.h <<_ACEOF
11894#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11895_ACEOF
11896
11897
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011898fi
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900ac_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 +020011901if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011902
11903cat >>confdefs.h <<_ACEOF
11904#define HAVE_STRUCT_STAT_ST_FLAGS 1
11905_ACEOF
11906
11907
11908fi
11909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910ac_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 +020011911if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011912
11913cat >>confdefs.h <<_ACEOF
11914#define HAVE_STRUCT_STAT_ST_GEN 1
11915_ACEOF
11916
11917
11918fi
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920ac_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 +020011921if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011922
11923cat >>confdefs.h <<_ACEOF
11924#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11925_ACEOF
11926
11927
11928fi
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930ac_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 +020011931if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011932
Martin v. Löwis11437992002-04-12 09:54:03 +000011933cat >>confdefs.h <<_ACEOF
11934#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11935_ACEOF
11936
11937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011939
11940else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011941 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011942 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11944 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011945esac
11946
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011947fi
11948
Michael W. Hudson54241132001-12-07 15:38:26 +000011949
Martin v. Löwis11437992002-04-12 09:54:03 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11952$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011953if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955else
Matthias Kloseb159a552010-04-25 21:00:44 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011958/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011959#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011960int
11961main ()
11962{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011963return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 ;
11965 return 0;
11966}
11967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011968if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011969 ac_cv_header_time_altzone=yes
11970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975fi
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11978$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011979if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982
11983fi
11984
Guido van Rossumda88dad1995-01-26 00:46:29 +000011985was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11987$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011989/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011990
11991#include <sys/types.h>
11992#include <sys/select.h>
11993#include <sys/time.h>
11994
Martin v. Löwis11437992002-04-12 09:54:03 +000011995int
11996main ()
11997{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998;
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öwis11437992002-04-12 09:54:03 +000012004
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012007
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012008 was_it_defined=yes
12009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12013$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12016$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012021/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012022#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012023int
12024main ()
12025{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012026struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 ;
12028 return 0;
12029}
12030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012032 ac_cv_struct_addrinfo=yes
12033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12037fi
12038
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12040$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012041if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012044
12045fi
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12048$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012049if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012054
12055# include <sys/types.h>
12056# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012057int
12058main ()
12059{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012060struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012066 ac_cv_struct_sockaddr_storage=yes
12067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12071fi
12072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12074$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078
12079fi
12080
Guido van Rossum627b2d71993-12-24 10:39:16 +000012081# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12084$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012085if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012090$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012091int
12092main ()
12093{
12094static int test_array [1 - 2 * !(((char) -1) < 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -040012095test_array [0] = 0;
12096return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
12098 ;
12099 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012100}
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012103 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12110$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012111if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113
12114fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12117$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012118if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123
Martin v. Löwis11437992002-04-12 09:54:03 +000012124int
12125main ()
12126{
Trent Nelsona4519a62012-10-16 11:51:08 -040012127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128#ifndef __cplusplus
Trent Nelsona4519a62012-10-16 11:51:08 -040012129 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 typedef int charset[2];
Trent Nelsona4519a62012-10-16 11:51:08 -040012131 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133 char const *const *pcpcc;
12134 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 /* NEC SVR4.0.2 mips cc rejects this. */
12136 struct point {int x, y;};
12137 static struct point const zero = {0,0};
12138 /* AIX XL C 1.02.0.0 rejects this.
12139 It does not let you subtract one const X* pointer from another in
12140 an arm of an if-expression whose if-part is not a constant
12141 expression */
12142 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145 ++pcpcc;
12146 ppc = (char**) pcpcc;
12147 pcpcc = (char const *const *) ppc;
Trent Nelsona4519a62012-10-16 11:51:08 -040012148 { /* SCO 3.2v4 cc rejects this sort of thing. */
12149 char tx;
12150 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 }
12156 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12157 int x[] = {25, 17};
12158 const int *foo = &x[0];
12159 ++foo;
12160 }
12161 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12162 typedef const int *iptr;
12163 iptr p = 0;
12164 ++p;
12165 }
Trent Nelsona4519a62012-10-16 11:51:08 -040012166 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Trent Nelsona4519a62012-10-16 11:51:08 -040012168 struct s { int j; const int *ap[3]; } bx;
12169 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 }
12171 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12172 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012176#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 ;
12179 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012180}
Martin v. Löwis11437992002-04-12 09:54:03 +000012181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012183 ac_cv_c_const=yes
12184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12190$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194
12195fi
12196
Michael W. Hudson54241132001-12-07 15:38:26 +000012197
Guido van Rossumda88dad1995-01-26 00:46:29 +000012198works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12200$as_echo_n "checking for working volatile... " >&6; }
12201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012202/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204int
12205main ()
12206{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012207volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ;
12209 return 0;
12210}
12211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012213 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214else
Skip Montanaro6dead952003-09-25 14:50:04 +000012215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012218
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12222$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012223
Guido van Rossumda88dad1995-01-26 00:46:29 +000012224works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12226$as_echo_n "checking for working signed char... " >&6; }
12227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012228/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230int
12231main ()
12232{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012233signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 ;
12235 return 0;
12236}
12237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012239 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012240else
Skip Montanaro6dead952003-09-25 14:50:04 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012243
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012244
Guido van Rossum7f43da71994-08-01 12:15:30 +000012245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12248$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012249
Guido van Rossumda88dad1995-01-26 00:46:29 +000012250have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12252$as_echo_n "checking for prototypes... " >&6; }
12253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012255int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012265
Matthias Kloseb9621712010-04-24 17:59:49 +000012266$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Matthias Kloseb159a552010-04-25 21:00:44 +000012268 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12272$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273
Guido van Rossumda88dad1995-01-26 00:46:29 +000012274works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12276$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012279
12280#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012281int foo(int x, ...) {
12282 va_list va;
12283 va_start(va, x);
12284 va_arg(va, int);
12285 va_arg(va, char *);
12286 va_arg(va, double);
12287 return 0;
12288}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290int
12291main ()
12292{
Guido van Rossum90eea071996-08-30 20:58:57 +000012293return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
12300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012303 works=yes
12304
Guido van Rossum627b2d71993-12-24 10:39:16 +000012305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12308$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309
Martin v. Löwisd6320502004-08-12 13:45:08 +000012310# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12312$as_echo_n "checking for socketpair... " >&6; }
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012314/* end confdefs.h. */
12315
12316#include <sys/types.h>
12317#include <sys/socket.h>
12318
12319int
12320main ()
12321{
12322void *x=socketpair
12323 ;
12324 return 0;
12325}
12326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012330
Matthias Kloseb159a552010-04-25 21:00:44 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012336
12337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012339
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12342$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012345#include <sys/types.h>
12346#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012347int
12348main ()
12349{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012350struct sockaddr x;
12351x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356if ac_fn_c_try_compile "$LINENO"; then :
12357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12358$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361
12362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012365
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368
Guido van Rossumda88dad1995-01-26 00:46:29 +000012369va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12371$as_echo_n "checking whether va_list is an array... " >&6; }
12372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374
12375#ifdef HAVE_STDARG_PROTOTYPES
12376#include <stdarg.h>
12377#else
12378#include <varargs.h>
12379#endif
12380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381int
12382main ()
12383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012384va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 ;
12386 return 0;
12387}
12388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389if ac_fn_c_try_compile "$LINENO"; then :
12390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391else
Skip Montanaro6dead952003-09-25 14:50:04 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Guido van Rossumda88dad1995-01-26 00:46:29 +000012396 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12401$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012403# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12412$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012413 OLD_CFLAGS=$CFLAGS
12414 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012417
12418# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420int
12421main ()
12422{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012423
12424 char *name;
12425 struct hostent *he, *res;
12426 char buffer[2048];
12427 int buflen = 2048;
12428 int h_errnop;
12429
12430 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
12432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012439
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12444$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012446else
Skip Montanaro6dead952003-09-25 14:50:04 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12449$as_echo "no" >&6; }
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12451$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012455# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457int
12458main ()
12459{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012460
12461 char *name;
12462 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012463 char buffer[2048];
12464 int buflen = 2048;
12465 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466
Matthias Kloseb159a552010-04-25 21:00:44 +000012467 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
12469 ;
12470 return 0;
12471}
12472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Matthias Kloseb159a552010-04-25 21:00:44 +000012478$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12481$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012483else
Skip Montanaro6dead952003-09-25 14:50:04 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12486$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12488$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12490/* end confdefs.h. */
12491
12492# include <netdb.h>
12493
12494int
12495main ()
12496{
12497
12498 char *name;
12499 struct hostent *he;
12500 struct hostent_data data;
12501
12502 (void) gethostbyname_r(name, he, &data);
12503
12504 ;
12505 return 0;
12506}
12507_ACEOF
12508if ac_fn_c_try_compile "$LINENO"; then :
12509
12510 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12511
12512
12513$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12514
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12516$as_echo "yes" >&6; }
12517
12518else
12519
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12521$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531 CFLAGS=$OLD_CFLAGS
12532
12533else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 for ac_func in gethostbyname
12536do :
12537 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012541_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012543fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012544done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012545
Michael W. Hudson54241132001-12-07 15:38:26 +000012546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012547fi
12548
Michael W. Hudson54241132001-12-07 15:38:26 +000012549
12550
12551
12552
12553
12554
Guido van Rossum627b2d71993-12-24 10:39:16 +000012555# checks for system services
12556# (none yet)
12557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012559ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012560if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012561
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012562else
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12564$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012565if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012569LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573/* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012576#ifdef __cplusplus
12577extern "C"
12578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012579char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012590else
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012595LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12598$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012599if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 cat >>confdefs.h <<_ACEOF
12601#define HAVE_LIBIEEE 1
12602_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012604 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
Guido van Rossum627b2d71993-12-24 10:39:16 +000012606fi
12607
Michael W. Hudson54241132001-12-07 15:38:26 +000012608
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012609fi
12610
Michael W. Hudson54241132001-12-07 15:38:26 +000012611
Guido van Rossum7f253911997-05-09 02:42:48 +000012612# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12614$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012617if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012619if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012620then
12621
Matthias Kloseb9621712010-04-24 17:59:49 +000012622$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12625$as_echo "yes" >&6; }
12626else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12627$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012628fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012629else
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632fi
12633
Guido van Rossum7f253911997-05-09 02:42:48 +000012634
Guido van Rossum7f43da71994-08-01 12:15:30 +000012635# check for --with-libm=...
12636
Guido van Rossum563e7081996-09-10 18:20:48 +000012637case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012638Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012639*) LIBM=-lm
12640esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12642$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012645if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012647if test "$withval" = no
12648then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12650$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012651elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012652then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12654$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012655else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012656fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12659$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660fi
12661
Guido van Rossum7f43da71994-08-01 12:15:30 +000012662
12663# check for --with-libc=...
12664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12666$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012669if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012671if test "$withval" = no
12672then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12674$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012675elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012676then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12678$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012679else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012680fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12683$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684fi
12685
Guido van Rossum7f43da71994-08-01 12:15:30 +000012686
Stefan Krah1919b7e2012-03-21 18:25:23 +010012687# **************************************
12688# * Check for gcc x64 inline assembler *
12689# **************************************
12690
12691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12692$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12694/* end confdefs.h. */
12695
12696int
12697main ()
12698{
12699
12700 __asm__ __volatile__ ("movq %rcx, %rax");
12701
12702 ;
12703 return 0;
12704}
12705_ACEOF
12706if ac_fn_c_try_compile "$LINENO"; then :
12707 have_gcc_asm_for_x64=yes
12708else
12709 have_gcc_asm_for_x64=no
12710fi
12711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12713$as_echo "$have_gcc_asm_for_x64" >&6; }
12714if test "$have_gcc_asm_for_x64" = yes
12715then
12716
12717$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12718
12719fi
12720
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012721# **************************************************
12722# * Check for various properties of floating point *
12723# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12726$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012729else
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012732 ac_cv_little_endian_double=no
12733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012735/* end confdefs.h. */
12736
12737#include <string.h>
12738int main() {
12739 double x = 9006104071832581.0;
12740 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12741 return 0;
12742 else
12743 return 1;
12744}
12745
12746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012748 ac_cv_little_endian_double=yes
12749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012754fi
12755
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012756fi
12757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12759$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012760if test "$ac_cv_little_endian_double" = yes
12761then
12762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012764
12765fi
12766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12768$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771else
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774 ac_cv_big_endian_double=no
12775else
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012777/* end confdefs.h. */
12778
12779#include <string.h>
12780int main() {
12781 double x = 9006104071832581.0;
12782 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12783 return 0;
12784 else
12785 return 1;
12786}
12787
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790 ac_cv_big_endian_double=yes
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012796fi
12797
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798fi
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12801$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012802if test "$ac_cv_big_endian_double" = yes
12803then
12804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012806
12807fi
12808
12809# Some ARM platforms use a mixed-endian representation for doubles.
12810# While Python doesn't currently have full support for these platforms
12811# (see e.g., issue 1762561), we can at least make sure that float <-> string
12812# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12814$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012815if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817else
12818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012820 ac_cv_mixed_endian_double=no
12821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012823/* end confdefs.h. */
12824
12825#include <string.h>
12826int main() {
12827 double x = 9006104071832581.0;
12828 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12829 return 0;
12830 else
12831 return 1;
12832}
12833
12834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012835if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836 ac_cv_mixed_endian_double=yes
12837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012842fi
12843
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012844fi
12845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12847$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012848if test "$ac_cv_mixed_endian_double" = yes
12849then
12850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012852
12853fi
12854
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012855# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012856# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012857# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012858# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012859# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012860# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012861
12862# This inline assembler syntax may also work for suncc and icc,
12863# so we try it on all platforms.
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12866$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012868/* end confdefs.h. */
12869
12870int
12871main ()
12872{
12873
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012874 unsigned short cw;
12875 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12876 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012877
12878 ;
12879 return 0;
12880}
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012883 have_gcc_asm_for_x87=yes
12884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012886fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12889$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012890if test "$have_gcc_asm_for_x87" = yes
12891then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012897# Detect whether system arithmetic is subject to x87-style double
12898# rounding issues. The result of this test has little meaning on non
12899# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12900# mode is round-to-nearest and double rounding issues are present, and
12901# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12903$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012904# $BASECFLAGS may affect the result
12905ac_save_cc="$CC"
12906CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012908 ac_cv_x87_double_rounding=no
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012911/* end confdefs.h. */
12912
12913#include <stdlib.h>
12914#include <math.h>
12915int main() {
12916 volatile double x, y, z;
12917 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12918 x = 0.99999999999999989; /* 1-2**-53 */
12919 y = 1./x;
12920 if (y != 1.)
12921 exit(0);
12922 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12923 x = 1e16;
12924 y = 2.99999;
12925 z = x + y;
12926 if (z != 1e16+4.)
12927 exit(0);
12928 /* both tests show evidence of double rounding */
12929 exit(1);
12930}
12931
12932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012934 ac_cv_x87_double_rounding=no
12935else
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012940fi
12941
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012942CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12944$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012945if test "$ac_cv_x87_double_rounding" = yes
12946then
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012949
12950fi
12951
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012952# ************************************
12953# * Check for mathematical functions *
12954# ************************************
12955
12956LIBS_SAVE=$LIBS
12957LIBS="$LIBS $LIBM"
12958
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012959for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12960do :
12961 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12962ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012963if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012964 cat >>confdefs.h <<_ACEOF
12965#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12966_ACEOF
12967
12968fi
12969done
12970
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012971for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012972do :
12973 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12974ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012975if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012976 cat >>confdefs.h <<_ACEOF
12977#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12978_ACEOF
12979
12980fi
12981done
12982
12983ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12984"
Victor Stinnere0be4232011-10-25 13:06:09 +020012985if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012986 ac_have_decl=1
12987else
12988 ac_have_decl=0
12989fi
12990
12991cat >>confdefs.h <<_ACEOF
12992#define HAVE_DECL_ISINF $ac_have_decl
12993_ACEOF
12994ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12995"
Victor Stinnere0be4232011-10-25 13:06:09 +020012996if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012997 ac_have_decl=1
12998else
12999 ac_have_decl=0
13000fi
13001
13002cat >>confdefs.h <<_ACEOF
13003#define HAVE_DECL_ISNAN $ac_have_decl
13004_ACEOF
13005ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13006"
Victor Stinnere0be4232011-10-25 13:06:09 +020013007if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013008 ac_have_decl=1
13009else
13010 ac_have_decl=0
13011fi
13012
13013cat >>confdefs.h <<_ACEOF
13014#define HAVE_DECL_ISFINITE $ac_have_decl
13015_ACEOF
13016
13017
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013018# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13019# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13021$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013022if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013024else
13025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013027 ac_cv_tanh_preserves_zero_sign=no
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013030/* end confdefs.h. */
13031
13032#include <math.h>
13033#include <stdlib.h>
13034int main() {
13035 /* return 0 if either negative zeros don't exist
13036 on this platform or if negative zeros exist
13037 and tanh(-0.) == -0. */
13038 if (atan2(0., -1.) == atan2(-0., -1.) ||
13039 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13040 else exit(1);
13041}
13042
13043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013045 ac_cv_tanh_preserves_zero_sign=yes
13046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013051fi
13052
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13056$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013057if test "$ac_cv_tanh_preserves_zero_sign" = yes
13058then
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013061
13062fi
13063
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013064if test "$ac_cv_func_log1p" = yes
13065then
13066 # On some versions of AIX, log1p(-0.) returns 0. instead of
13067 # -0. See issue #9920.
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13069$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013070 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013071 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013072else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013073
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013074 if test "$cross_compiling" = yes; then :
13075 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013076else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13078/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013079
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013080 #include <math.h>
13081 #include <stdlib.h>
13082 int main() {
13083 /* Fail if the signs of log1p(-0.) and -0. can be
13084 distinguished. */
13085 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13086 return 0;
13087 else
13088 return 1;
13089 }
13090
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013091_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013092if ac_fn_c_try_run "$LINENO"; then :
13093 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013094else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013095 ac_cv_log1p_drops_zero_sign=yes
13096fi
13097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013099fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013100
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013101fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013102
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13104$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13105fi
13106if test "$ac_cv_log1p_drops_zero_sign" = yes
13107then
13108
13109$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13110
13111fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013112
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013113LIBS=$LIBS_SAVE
13114
Mark Dickinsona614f042009-11-28 12:48:43 +000013115# For multiprocessing module, check that sem_open
13116# actually works. For FreeBSD versions <= 7.2,
13117# the kernel module that provides POSIX semaphores
13118# isn't loaded by default, so an attempt to call
13119# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13121$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013122if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013126 ac_cv_posix_semaphores_enabled=yes
13127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013129/* end confdefs.h. */
13130
13131#include <unistd.h>
13132#include <fcntl.h>
13133#include <stdio.h>
13134#include <semaphore.h>
13135#include <sys/stat.h>
13136
13137int main(void) {
13138 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13139 if (a == SEM_FAILED) {
13140 perror("sem_open");
13141 return 1;
13142 }
13143 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013144 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013145 return 0;
13146}
13147
13148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013150 ac_cv_posix_semaphores_enabled=yes
13151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013156fi
13157
13158
Mark Dickinsona614f042009-11-28 12:48:43 +000013159fi
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13162$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013163if test $ac_cv_posix_semaphores_enabled = no
13164then
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013167
13168fi
13169
Mark Dickinson10683072009-04-18 21:18:19 +000013170# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13172$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013173if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013180/* end confdefs.h. */
13181
13182#include <unistd.h>
13183#include <fcntl.h>
13184#include <stdio.h>
13185#include <semaphore.h>
13186#include <sys/stat.h>
13187
13188int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013189 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013190 int count;
13191 int res;
13192 if(a==SEM_FAILED){
13193 perror("sem_open");
13194 return 1;
13195
13196 }
13197 res = sem_getvalue(a, &count);
13198 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013199 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013200 return res==-1 ? 1 : 0;
13201}
13202
Mark Dickinson10683072009-04-18 21:18:19 +000013203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013205 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013211fi
13212
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013214fi
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13217$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218if test $ac_cv_broken_sem_getvalue = yes
13219then
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222
13223fi
13224
Mark Dickinsonbd792642009-03-18 20:06:12 +000013225# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13227$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013228# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013230 enableval=$enable_big_digits; case $enable_big_digits in
13231yes)
13232 enable_big_digits=30 ;;
13233no)
13234 enable_big_digits=15 ;;
1323515|30)
13236 ;;
13237*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013238 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 +000013239esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13241$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013242
13243cat >>confdefs.h <<_ACEOF
13244#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13245_ACEOF
13246
13247
13248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13250$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013251fi
13252
13253
Guido van Rossumef2255b2000-03-10 22:30:29 +000013254# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013255ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013256if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013261 wchar_h="yes"
13262
Guido van Rossumef2255b2000-03-10 22:30:29 +000013263else
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013265
13266fi
13267
Michael W. Hudson54241132001-12-07 15:38:26 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013270# determine wchar_t size
13271if test "$wchar_h" = yes
13272then
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13278$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013279if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13283"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 if test "$ac_cv_type_wchar_t" = yes; then
13287 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013289as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013290See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013291 else
13292 ac_cv_sizeof_wchar_t=0
13293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013295
Martin v. Löwis11437992002-04-12 09:54:03 +000013296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13298$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299
13300
13301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013303#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013304_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013305
Michael W. Hudson54241132001-12-07 15:38:26 +000013306
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013307fi
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13310$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013311have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013314
13315#include <tcl.h>
13316#if TCL_UTF_MAX != 6
13317# error "NOT UCS4_TCL"
13318#endif
13319int
13320main ()
13321{
13322
13323 ;
13324 return 0;
13325}
13326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013328
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013331
13332 have_ucs4_tcl=yes
13333
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13337$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013338
Skip Montanaro6dead952003-09-25 14:50:04 +000013339# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013340if test "$wchar_h" = yes
13341then
13342 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13344$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013345 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013347else
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013350 ac_cv_wchar_t_signed=yes
13351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013353/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013354
13355 #include <wchar.h>
13356 int main()
13357 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013358 /* Success: exit code 0 */
13359 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013360 }
13361
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013364 ac_cv_wchar_t_signed=yes
13365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13369 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013370fi
13371
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13375$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376fi
13377
Georg Brandl52d168a2008-01-07 18:10:24 +000013378# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013379if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013380 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013381then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013382 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Georg Brandl52d168a2008-01-07 18:10:24 +000013386else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013387 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013388fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13390$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013391
13392# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13394$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013395if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ac_cv_c_bigendian=unknown
13399 # See if we're dealing with a universal compiler.
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401/* end confdefs.h. */
13402#ifndef __APPLE_CC__
13403 not a universal capable compiler
13404 #endif
13405 typedef int dummy;
13406
Skip Montanaro6dead952003-09-25 14:50:04 +000013407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
13409
13410 # Check for potential -arch flags. It is not universal unless
13411 # there are at least two -arch flags with different values.
13412 ac_arch=
13413 ac_prev=
13414 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13415 if test -n "$ac_prev"; then
13416 case $ac_word in
13417 i?86 | x86_64 | ppc | ppc64)
13418 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13419 ac_arch=$ac_word
13420 else
13421 ac_cv_c_bigendian=universal
13422 break
13423 fi
13424 ;;
13425 esac
13426 ac_prev=
13427 elif test "x$ac_word" = "x-arch"; then
13428 ac_prev=arch
13429 fi
13430 done
13431fi
13432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433 if test $ac_cv_c_bigendian = unknown; then
13434 # See if sys/param.h defines the BYTE_ORDER macro.
13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013436/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013437#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440int
13441main ()
13442{
Matthias Kloseb9621712010-04-24 17:59:49 +000013443#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13444 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13445 && LITTLE_ENDIAN)
13446 bogus endian macros
13447 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
13449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013454 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013457#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460int
13461main ()
13462{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013463#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 not big endian
13465 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
13467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013472 ac_cv_c_bigendian=yes
13473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013477fi
13478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13479 fi
13480 if test $ac_cv_c_bigendian = unknown; then
13481 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013483/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013484#include <limits.h>
13485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486int
13487main ()
13488{
Matthias Kloseb9621712010-04-24 17:59:49 +000013489#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13490 bogus endian macros
13491 #endif
13492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ;
13494 return 0;
13495}
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_compile "$LINENO"; then :
13498 # It does; now see whether it defined to _BIG_ENDIAN or not.
13499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13500/* end confdefs.h. */
13501#include <limits.h>
13502
13503int
13504main ()
13505{
13506#ifndef _BIG_ENDIAN
13507 not big endian
13508 #endif
13509
13510 ;
13511 return 0;
13512}
13513_ACEOF
13514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13520fi
13521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522 fi
13523 if test $ac_cv_c_bigendian = unknown; then
13524 # Compile a test program.
13525 if test "$cross_compiling" = yes; then :
13526 # Try to guess by grepping values from an object file.
13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13528/* end confdefs.h. */
13529short int ascii_mm[] =
13530 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13531 short int ascii_ii[] =
13532 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13533 int use_ascii (int i) {
13534 return ascii_mm[i] + ascii_ii[i];
13535 }
13536 short int ebcdic_ii[] =
13537 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13538 short int ebcdic_mm[] =
13539 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13540 int use_ebcdic (int i) {
13541 return ebcdic_mm[i] + ebcdic_ii[i];
13542 }
13543 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545int
13546main ()
13547{
13548return use_ascii (foo) == use_ebcdic (foo);
13549 ;
13550 return 0;
13551}
13552_ACEOF
13553if ac_fn_c_try_compile "$LINENO"; then :
13554 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13555 ac_cv_c_bigendian=yes
13556 fi
13557 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13558 if test "$ac_cv_c_bigendian" = unknown; then
13559 ac_cv_c_bigendian=no
13560 else
13561 # finding both strings is unlikely to happen, but who knows?
13562 ac_cv_c_bigendian=unknown
13563 fi
13564 fi
13565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013569/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013571int
13572main ()
13573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 /* Are we little or big endian? From Harbison&Steele. */
13576 union
13577 {
13578 long int l;
13579 char c[sizeof (long int)];
13580 } u;
13581 u.l = 1;
13582 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013583
13584 ;
13585 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013586}
Martin v. Löwis11437992002-04-12 09:54:03 +000013587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013589 ac_cv_c_bigendian=no
13590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13600$as_echo "$ac_cv_c_bigendian" >&6; }
13601 case $ac_cv_c_bigendian in #(
13602 yes)
13603 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13604;; #(
13605 no)
13606 ;; #(
13607 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 ;; #(
13612 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013613 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013614 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013616
Michael W. Hudson54241132001-12-07 15:38:26 +000013617
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013618# ABI version string for Python extension modules. This appears between the
13619# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13620# from the following attributes which affect the ABI of this Python build (in
13621# this order):
13622#
13623# * The Python implementation (always 'cpython-' for us)
13624# * The major and minor version numbers
13625# * --with-pydebug (adds a 'd')
13626# * --with-pymalloc (adds a 'm')
13627# * --with-wide-unicode (adds a 'u')
13628#
13629# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013630# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13631# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013632
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13634$as_echo_n "checking ABIFLAGS... " >&6; }
13635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13636$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13638$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013639SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13641$as_echo "$SOABI" >&6; }
13642
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13644$as_echo_n "checking LDVERSION... " >&6; }
13645LDVERSION='$(VERSION)$(ABIFLAGS)'
13646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13647$as_echo "$LDVERSION" >&6; }
13648
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013649# SO is the extension of shared libraries `(including the dot!)
13650# -- usually .so, .sl on HP-UX, .dll on Cygwin
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13652$as_echo_n "checking SO... " >&6; }
13653if test -z "$SO"
13654then
13655 case $ac_sys_system in
13656 hp*|HP*)
13657 case `uname -m` in
13658 ia64) SO=.so;;
13659 *) SO=.sl;;
13660 esac
13661 ;;
13662 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013663 Linux*|GNU*)
13664 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013665 *) SO=.so;;
13666 esac
13667else
13668 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013669 echo
13670 echo '====================================================================='
13671 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013672 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013673 echo '+ Do you really mean to change the extension for shared libraries? +'
13674 echo '+ Continuing in 10 seconds to let you to ponder. +'
13675 echo '+ +'
13676 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013677 sleep 10
13678fi
13679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13680$as_echo "$SO" >&6; }
13681
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013682# Check whether right shifting a negative integer extends the sign bit
13683# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13685$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013686if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013688else
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013691 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013695
13696int main()
13697{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013698 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013699}
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013703 ac_cv_rshift_extends_sign=yes
13704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013709fi
13710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711fi
13712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13714$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013715if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013716then
Martin v. Löwis11437992002-04-12 09:54:03 +000013717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013719
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013720fi
13721
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013722# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13724$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013725if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013730/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013731#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013732int
13733main ()
13734{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013735
13736 FILE *f = fopen("/dev/null", "r");
13737 flockfile(f);
13738 getc_unlocked(f);
13739 funlockfile(f);
13740
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ;
13742 return 0;
13743}
13744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013746 ac_cv_have_getc_unlocked=yes
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_have_getc_unlocked=no
13749fi
13750rm -f core conftest.err conftest.$ac_objext \
13751 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13755$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013756if test "$ac_cv_have_getc_unlocked" = yes
13757then
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013760
13761fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013762
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013763# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013764# save the value of LIBS so we don't actually link Python with readline
13765LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013766
Gregory P. Smith18820942008-09-07 06:24:49 +000013767# On some systems we need to link readline to a termcap compatible
13768# library. NOTE: Keep the precedence of listed libraries synchronised
13769# with setup.py.
13770py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13772$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013773for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013774 if test -z "$py_libtermcap"; then
13775 READLINE_LIBS="-lreadline"
13776 else
13777 READLINE_LIBS="-lreadline -l$py_libtermcap"
13778 fi
13779 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013781/* end confdefs.h. */
13782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783/* Override any GCC internal prototype to avoid an error.
13784 Use char because int might match the return type of a GCC
13785 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013786#ifdef __cplusplus
13787extern "C"
13788#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013789char readline ();
13790int
13791main ()
13792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013799 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013803 if test $py_cv_lib_readline = yes; then
13804 break
13805 fi
13806done
13807# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13808#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013809if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13811$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13814$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013817
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013818fi
13819
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013820# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13822$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013825else
13826 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013827LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013829/* end confdefs.h. */
13830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831/* Override any GCC internal prototype to avoid an error.
13832 Use char because int might match the return type of a GCC
13833 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013834#ifdef __cplusplus
13835extern "C"
13836#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013837char rl_callback_handler_install ();
13838int
13839main ()
13840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013842 ;
13843 return 0;
13844}
13845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013847 ac_cv_lib_readline_rl_callback_handler_install=yes
13848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013851rm -f core conftest.err conftest.$ac_objext \
13852 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013853LIBS=$ac_check_lib_save_LIBS
13854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13856$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013857if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013860
13861fi
13862
13863
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013864# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013866/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013867#include <readline/readline.h>
13868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013870 have_readline=yes
13871else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013872 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013873
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013874fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013875rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013876if test $have_readline = yes
13877then
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013879/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013880#include <readline/readline.h>
13881
13882_ACEOF
13883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013887
13888fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013889rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013892/* end confdefs.h. */
13893#include <readline/readline.h>
13894
13895_ACEOF
13896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013900
13901fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013902rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013903
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013904fi
13905
Martin v. Löwis0daad592001-09-30 21:09:59 +000013906# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13908$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013909if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013911else
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013913LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917/* Override any GCC internal prototype to avoid an error.
13918 Use char because int might match the return type of a GCC
13919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef __cplusplus
13921extern "C"
13922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013923char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013924int
13925main ()
13926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 ;
13929 return 0;
13930}
13931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013937rm -f core conftest.err conftest.$ac_objext \
13938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013939LIBS=$ac_check_lib_save_LIBS
13940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13942$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013946
Martin v. Löwis0daad592001-09-30 21:09:59 +000013947fi
13948
Michael W. Hudson54241132001-12-07 15:38:26 +000013949
Thomas Wouters89d996e2007-09-08 17:39:28 +000013950# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13952$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013955else
13956 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013957LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013959/* end confdefs.h. */
13960
13961/* Override any GCC internal prototype to avoid an error.
13962 Use char because int might match the return type of a GCC
13963 builtin and then its argument prototype would still apply. */
13964#ifdef __cplusplus
13965extern "C"
13966#endif
13967char rl_completion_display_matches_hook ();
13968int
13969main ()
13970{
13971return rl_completion_display_matches_hook ();
13972 ;
13973 return 0;
13974}
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013977 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981rm -f core conftest.err conftest.$ac_objext \
13982 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013983LIBS=$ac_check_lib_save_LIBS
13984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13986$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013987if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013990
13991fi
13992
13993
Martin v. Löwis0daad592001-09-30 21:09:59 +000013994# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13996$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013997if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013999else
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014001LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005/* Override any GCC internal prototype to avoid an error.
14006 Use char because int might match the return type of a GCC
14007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014008#ifdef __cplusplus
14009extern "C"
14010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014011char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014012int
14013main ()
14014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 ;
14017 return 0;
14018}
14019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014022else
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014025rm -f core conftest.err conftest.$ac_objext \
14026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014027LIBS=$ac_check_lib_save_LIBS
14028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14030$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014031if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014034
Guido van Rossum353ae582001-07-10 16:45:32 +000014035fi
14036
Jack Jansendd19cf82001-12-06 22:36:17 +000014037
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014038# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014040/* end confdefs.h. */
14041#include <readline/readline.h>
14042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014044 have_readline=yes
14045else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014046 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014047
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014048fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014049rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050if test $have_readline = yes
14051then
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014053/* end confdefs.h. */
14054#include <readline/readline.h>
14055
14056_ACEOF
14057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061
14062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014063rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014064
14065fi
14066
Martin v. Löwis82bca632006-02-10 20:49:30 +000014067# End of readline checks: restore LIBS
14068LIBS=$LIBS_no_readline
14069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14071$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014072if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014074else
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014077 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014080/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014081
14082int main()
14083{
14084 int val1 = nice(1);
14085 if (val1 != -1 && val1 == nice(2))
14086 exit(0);
14087 exit(1);
14088}
14089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014092 ac_cv_broken_nice=yes
14093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014098fi
14099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100fi
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14103$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014104if test "$ac_cv_broken_nice" = yes
14105then
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014108
14109fi
14110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14112$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014115else
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014117 ac_cv_broken_poll=no
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014120/* end confdefs.h. */
14121
14122#include <poll.h>
14123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014124int main()
14125{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014126 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014127 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014128
14129 close (42);
14130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014131 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014132 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014134 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 return 1;
14138}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014139
14140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014141if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014142 ac_cv_broken_poll=yes
14143else
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014150fi
14151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14153$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014154if test "$ac_cv_broken_poll" = yes
14155then
14156
Matthias Kloseb9621712010-04-24 17:59:49 +000014157$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014158
14159fi
14160
Brett Cannon43802422005-02-10 20:48:03 +000014161# 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 +000014162# (which is not required by ISO C or UNIX spec) and/or if we support
14163# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014164ac_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 +000014165#include <$ac_cv_struct_tm>
14166
Matthias Kloseb9621712010-04-24 17:59:49 +000014167"
Victor Stinnere0be4232011-10-25 13:06:09 +020014168if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014169
14170cat >>confdefs.h <<_ACEOF
14171#define HAVE_STRUCT_TM_TM_ZONE 1
14172_ACEOF
14173
14174
14175fi
14176
14177if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14178
Matthias Kloseb9621712010-04-24 17:59:49 +000014179$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014180
14181else
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14183"
Victor Stinnere0be4232011-10-25 13:06:09 +020014184if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188fi
14189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192_ACEOF
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14195$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014196if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014200/* end confdefs.h. */
14201#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202#if !HAVE_DECL_TZNAME
14203extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014204#endif
14205
14206int
14207main ()
14208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014210 ;
14211 return 0;
14212}
14213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014214if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014215 ac_cv_var_tzname=yes
14216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014219rm -f core conftest.err conftest.$ac_objext \
14220 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14223$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014224 if test $ac_cv_var_tzname = yes; then
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014227
14228 fi
14229fi
14230
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014231
Martin v. Löwis1d459062005-03-14 21:23:33 +000014232# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14234$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014237else
14238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014240 ac_cv_working_tzset=no
14241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014244
14245#include <stdlib.h>
14246#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014247#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014248
14249#if HAVE_TZNAME
14250extern char *tzname[];
14251#endif
14252
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014253int main()
14254{
Brett Cannon18367812003-09-19 00:59:16 +000014255 /* Note that we need to ensure that not only does tzset(3)
14256 do 'something' with localtime, but it works as documented
14257 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014258 This includes making sure that tzname is set properly if
14259 tm->tm_zone does not exist since it is the alternative way
14260 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014261
14262 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014263 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014264 */
14265
Martin v. Löwis1d459062005-03-14 21:23:33 +000014266 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014267 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14268
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014269 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014270 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014271 if (localtime(&groundhogday)->tm_hour != 0)
14272 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014273#if HAVE_TZNAME
14274 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14275 if (strcmp(tzname[0], "UTC") ||
14276 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14277 exit(1);
14278#endif
Brett Cannon18367812003-09-19 00:59:16 +000014279
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014280 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014281 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014282 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014284#if HAVE_TZNAME
14285 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14286 exit(1);
14287#endif
Brett Cannon18367812003-09-19 00:59:16 +000014288
14289 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14290 tzset();
14291 if (localtime(&groundhogday)->tm_hour != 11)
14292 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014293#if HAVE_TZNAME
14294 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14295 exit(1);
14296#endif
14297
14298#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014299 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14300 exit(1);
14301 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14302 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014303#endif
Brett Cannon18367812003-09-19 00:59:16 +000014304
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014305 exit(0);
14306}
14307
14308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014309if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014310 ac_cv_working_tzset=yes
14311else
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014316fi
14317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318fi
14319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14321$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014322if test "$ac_cv_working_tzset" = yes
14323then
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014326
14327fi
14328
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014329# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14331$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014332if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014334else
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014336/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014337#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014338int
14339main ()
14340{
14341
14342struct stat st;
14343st.st_mtim.tv_nsec = 1;
14344
14345 ;
14346 return 0;
14347}
14348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014350 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14355fi
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14358$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014359if test "$ac_cv_stat_tv_nsec" = yes
14360then
14361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014363
14364fi
14365
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014366# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14368$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014369if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014371else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014373/* end confdefs.h. */
14374#include <sys/stat.h>
14375int
14376main ()
14377{
14378
14379struct stat st;
14380st.st_mtimespec.tv_nsec = 1;
14381
14382 ;
14383 return 0;
14384}
14385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014387 ac_cv_stat_tv_nsec2=yes
14388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14392fi
14393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14395$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014396if test "$ac_cv_stat_tv_nsec2" = yes
14397then
14398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014400
14401fi
14402
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014403ac_save_cppflags="$CPPFLAGS"
14404CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014405# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14407$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014408if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014412/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014413#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014414int
14415main ()
14416{
Jack Jansen666b1e72001-10-31 12:11:48 +000014417
14418 int rtn;
14419 rtn = mvwdelch(0,0,0);
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 ;
14422 return 0;
14423}
14424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014425if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014426 ac_cv_mvwdelch_is_expression=yes
14427else
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14431fi
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14434$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014435
14436if test "$ac_cv_mvwdelch_is_expression" = yes
14437then
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014440
14441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14444$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014445if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014449/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014450#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014451int
14452main ()
14453{
Jack Jansen666b1e72001-10-31 12:11:48 +000014454
14455 WINDOW *w;
14456 w->_flags = 0;
14457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 ;
14459 return 0;
14460}
14461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014462if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014463 ac_cv_window_has_flags=yes
14464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468fi
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14471$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014472
Jack Jansen666b1e72001-10-31 12:11:48 +000014473
14474if test "$ac_cv_window_has_flags" = yes
14475then
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014478
14479fi
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14482$as_echo_n "checking for is_term_resized... " >&6; }
14483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014484/* end confdefs.h. */
14485#include <curses.h>
14486int
14487main ()
14488{
14489void *x=is_term_resized
14490 ;
14491 return 0;
14492}
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014497
Matthias Kloseb159a552010-04-25 21:00:44 +000014498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014499$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014500else
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14502$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014503
14504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14508$as_echo_n "checking for resize_term... " >&6; }
14509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014510/* end confdefs.h. */
14511#include <curses.h>
14512int
14513main ()
14514{
14515void *x=resize_term
14516 ;
14517 return 0;
14518}
14519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014523
Matthias Kloseb159a552010-04-25 21:00:44 +000014524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14528$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014529
14530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14534$as_echo_n "checking for resizeterm... " >&6; }
14535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014536/* end confdefs.h. */
14537#include <curses.h>
14538int
14539main ()
14540{
14541void *x=resizeterm
14542 ;
14543 return 0;
14544}
14545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014549
Matthias Kloseb159a552010-04-25 21:00:44 +000014550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014551$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14554$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014555
14556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014558# last curses configure check
14559CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14562$as_echo "$as_me: checking for device files" >&6;}
14563
14564if test "x$cross_compiling" = xyes; then
14565 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14567$as_echo_n "checking for /dev/ptmx... " >&6; }
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14569$as_echo "not set" >&6; }
14570 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14571 fi
14572 if test "${ac_cv_file__dev_ptc+set}" != set; then
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14574$as_echo_n "checking for /dev/ptc... " >&6; }
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14576$as_echo "not set" >&6; }
14577 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14578 fi
14579fi
14580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14582$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014583if ${ac_cv_file__dev_ptmx+:} false; then :
14584 $as_echo_n "(cached) " >&6
14585else
14586 test "$cross_compiling" = yes &&
14587 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14588if test -r "/dev/ptmx"; then
14589 ac_cv_file__dev_ptmx=yes
14590else
14591 ac_cv_file__dev_ptmx=no
14592fi
14593fi
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14595$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14596if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014597
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014598fi
14599
14600if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014601
Matthias Kloseb9621712010-04-24 17:59:49 +000014602$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014603
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14606$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014607if ${ac_cv_file__dev_ptc+:} false; then :
14608 $as_echo_n "(cached) " >&6
14609else
14610 test "$cross_compiling" = yes &&
14611 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14612if test -r "/dev/ptc"; then
14613 ac_cv_file__dev_ptc=yes
14614else
14615 ac_cv_file__dev_ptc=no
14616fi
14617fi
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14619$as_echo "$ac_cv_file__dev_ptc" >&6; }
14620if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014621
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014622fi
14623
14624if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014627
Neal Norwitz865400f2003-03-21 01:42:58 +000014628fi
14629
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014630if test "$have_long_long" = yes
14631then
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14633$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014634 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014638 ac_cv_have_long_long_format="cross -- assuming no"
14639 if test x$GCC = xyes; then
14640 save_CFLAGS=$CFLAGS
14641 CFLAGS="$CFLAGS -Werror -Wformat"
14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14643/* end confdefs.h. */
14644
14645 #include <stdio.h>
14646 #include <stddef.h>
14647
14648int
14649main ()
14650{
14651
14652 char *buffer;
14653 sprintf(buffer, "%lld", (long long)123);
14654 sprintf(buffer, "%lld", (long long)-123);
14655 sprintf(buffer, "%llu", (unsigned long long)123);
14656
14657 ;
14658 return 0;
14659}
14660_ACEOF
14661if ac_fn_c_try_compile "$LINENO"; then :
14662 ac_cv_have_long_long_format=yes
14663
14664fi
14665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14666 CFLAGS=$save_CFLAGS
14667 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014670/* end confdefs.h. */
14671
14672 #include <stdio.h>
14673 #include <stddef.h>
14674 #include <string.h>
14675
14676 #ifdef HAVE_SYS_TYPES_H
14677 #include <sys/types.h>
14678 #endif
14679
14680 int main()
14681 {
14682 char buffer[256];
14683
14684 if (sprintf(buffer, "%lld", (long long)123) < 0)
14685 return 1;
14686 if (strcmp(buffer, "123"))
14687 return 1;
14688
14689 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14690 return 1;
14691 if (strcmp(buffer, "-123"))
14692 return 1;
14693
14694 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14695 return 1;
14696 if (strcmp(buffer, "123"))
14697 return 1;
14698
14699 return 0;
14700 }
14701
14702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014703if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014704 ac_cv_have_long_long_format=yes
14705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014710fi
14711
14712
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014713fi
14714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14716$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014717fi
14718
Mark Dickinson89d7d412009-12-31 20:50:59 +000014719if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014720then
14721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014723
14724fi
14725
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014726if test $ac_sys_system = Darwin
14727then
14728 LIBS="$LIBS -framework CoreFoundation"
14729fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14732$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014733if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014737 ac_cv_have_size_t_format="cross -- assuming yes"
14738
Thomas Wouters477c8d52006-05-27 19:21:47 +000014739else
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014741/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014742
Thomas Wouters477c8d52006-05-27 19:21:47 +000014743#include <stdio.h>
14744#include <stddef.h>
14745#include <string.h>
14746
Christian Heimes2c181612007-12-17 20:04:13 +000014747#ifdef HAVE_SYS_TYPES_H
14748#include <sys/types.h>
14749#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014750
14751#ifdef HAVE_SSIZE_T
14752typedef ssize_t Py_ssize_t;
14753#elif SIZEOF_VOID_P == SIZEOF_LONG
14754typedef long Py_ssize_t;
14755#else
14756typedef int Py_ssize_t;
14757#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014758
Christian Heimes2c181612007-12-17 20:04:13 +000014759int main()
14760{
14761 char buffer[256];
14762
Thomas Wouters477c8d52006-05-27 19:21:47 +000014763 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14764 return 1;
14765
Thomas Wouters89f507f2006-12-13 04:49:30 +000014766 if (strcmp(buffer, "123"))
14767 return 1;
14768
14769 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14770 return 1;
14771
14772 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014773 return 1;
14774
14775 return 0;
14776}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014777
Thomas Wouters477c8d52006-05-27 19:21:47 +000014778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014779if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014780 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014781else
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014786fi
14787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14790$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014791if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794
14795fi
14796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014798#ifdef HAVE_SYS_TYPES_H
14799#include <sys/types.h>
14800#endif
14801#ifdef HAVE_SYS_SOCKET_H
14802#include <sys/socket.h>
14803#endif
14804
Matthias Kloseb9621712010-04-24 17:59:49 +000014805"
Victor Stinnere0be4232011-10-25 13:06:09 +020014806if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014811
14812fi
14813
Michael W. Hudson54241132001-12-07 15:38:26 +000014814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14816$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014817if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014821 ac_cv_broken_mbstowcs=no
14822else
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014824/* end confdefs.h. */
14825
14826#include<stdlib.h>
14827int main() {
14828 size_t len = -1;
14829 const char *str = "text";
14830 len = mbstowcs(NULL, str, 0);
14831 return (len != 4);
14832}
14833
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014836 ac_cv_broken_mbstowcs=no
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014842fi
14843
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014844fi
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14847$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014848if test "$ac_cv_broken_mbstowcs" = yes
14849then
14850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014852
14853fi
14854
Antoine Pitroub52ec782009-01-25 16:34:23 +000014855# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14857$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014858
14859# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014860if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014861 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014862if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014863then
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14868$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014869fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014870if test "$withval" = no
14871then
14872
14873$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014877fi
14878
Antoine Pitrou042b1282010-08-13 21:15:58 +000014879else
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14881$as_echo "no value specified" >&6; }
14882fi
14883
Antoine Pitroub52ec782009-01-25 16:34:23 +000014884
Matthias Kloseb17289e2012-03-15 19:51:34 +010014885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14886$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14887if ${ac_cv_computed_gotos+:} false; then :
14888 $as_echo_n "(cached) " >&6
14889else
14890 if test "$cross_compiling" = yes; then :
14891 if test "${with_computed_gotos+set}" = set; then
14892 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14893 else
14894 ac_cv_computed_gotos=no
14895 fi
14896else
14897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14898/* end confdefs.h. */
14899
14900int main(int argc, char **argv)
14901{
14902 static void *targets[1] = { &&LABEL1 };
14903 goto LABEL2;
14904LABEL1:
14905 return 0;
14906LABEL2:
14907 goto *targets[0];
14908 return 1;
14909}
14910
14911_ACEOF
14912if ac_fn_c_try_run "$LINENO"; then :
14913 ac_cv_computed_gotos=yes
14914else
14915 ac_cv_computed_gotos=no
14916fi
14917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14918 conftest.$ac_objext conftest.beam conftest.$ac_ext
14919fi
14920
14921fi
14922
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14924$as_echo "$ac_cv_computed_gotos" >&6; }
14925case "$ac_cv_computed_gotos" in yes*)
14926
14927$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14928
14929esac
14930
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014931case $ac_sys_system in
14932AIX*)
14933
14934$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14935 ;;
14936esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014937
Michael W. Hudson54241132001-12-07 15:38:26 +000014938
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014939
14940
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014941for h in `(cd $srcdir;echo Python/thread_*.h)`
14942do
14943 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14944done
14945
Michael W. Hudson54241132001-12-07 15:38:26 +000014946
Neal Norwitzd24499d2005-12-18 21:36:39 +000014947SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14949$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014950for dir in $SRCDIRS; do
14951 if test ! -d $dir; then
14952 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014953 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014954done
Matthias Kloseb9621712010-04-24 17:59:49 +000014955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14956$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014957
Stefan Krah1919b7e2012-03-21 18:25:23 +010014958# Availability of -O2:
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14960$as_echo_n "checking for -O2... " >&6; }
14961saved_cflags="$CFLAGS"
14962CFLAGS="-O2"
14963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964/* end confdefs.h. */
14965
14966int
14967main ()
14968{
14969
14970
14971 ;
14972 return 0;
14973}
14974_ACEOF
14975if ac_fn_c_try_compile "$LINENO"; then :
14976 have_O2=yes
14977else
14978 have_O2=no
14979fi
14980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14982$as_echo "$have_O2" >&6; }
14983CFLAGS="$saved_cflags"
14984
14985# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14986# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14988$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14989saved_cflags="$CFLAGS"
14990CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14991if test "$have_O2" = no; then
14992 CFLAGS=""
14993fi
14994if test "$cross_compiling" = yes; then :
14995 have_glibc_memmove_bug=undefined
14996else
14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14998/* end confdefs.h. */
14999
15000#include <stdio.h>
15001#include <stdlib.h>
15002#include <string.h>
15003void foo(void *p, void *q) { memmove(p, q, 19); }
15004int main() {
15005 char a[32] = "123456789000000000";
15006 foo(&a[9], a);
15007 if (strcmp(a, "123456789123456789000000000") != 0)
15008 return 1;
15009 foo(a, &a[9]);
15010 if (strcmp(a, "123456789000000000") != 0)
15011 return 1;
15012 return 0;
15013}
15014
15015_ACEOF
15016if ac_fn_c_try_run "$LINENO"; then :
15017 have_glibc_memmove_bug=no
15018else
15019 have_glibc_memmove_bug=yes
15020fi
15021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15022 conftest.$ac_objext conftest.beam conftest.$ac_ext
15023fi
15024
15025CFLAGS="$saved_cflags"
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15027$as_echo "$have_glibc_memmove_bug" >&6; }
15028if test "$have_glibc_memmove_bug" = yes; then
15029
15030$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15031
15032fi
15033
15034if test "$have_gcc_asm_for_x87" = yes; then
15035 # Some versions of gcc miscompile inline asm:
15036 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15037 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15038 case $CC in
15039 *gcc*)
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15041$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15042 saved_cflags="$CFLAGS"
15043 CFLAGS="-O2"
15044 if test "$cross_compiling" = yes; then :
15045 have_ipa_pure_const_bug=undefined
15046else
15047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15048/* end confdefs.h. */
15049
15050 __attribute__((noinline)) int
15051 foo(int *p) {
15052 int r;
15053 asm ( "movl \$6, (%1)\n\t"
15054 "xorl %0, %0\n\t"
15055 : "=r" (r) : "r" (p) : "memory"
15056 );
15057 return r;
15058 }
15059 int main() {
15060 int p = 8;
15061 if ((foo(&p) ? : p) != 6)
15062 return 1;
15063 return 0;
15064 }
15065
15066_ACEOF
15067if ac_fn_c_try_run "$LINENO"; then :
15068 have_ipa_pure_const_bug=no
15069else
15070 have_ipa_pure_const_bug=yes
15071fi
15072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15073 conftest.$ac_objext conftest.beam conftest.$ac_ext
15074fi
15075
15076 CFLAGS="$saved_cflags"
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15078$as_echo "$have_ipa_pure_const_bug" >&6; }
15079 if test "$have_ipa_pure_const_bug" = yes; then
15080
15081$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15082
15083 fi
15084 ;;
15085 esac
15086fi
15087
Guido van Rossum627b2d71993-12-24 10:39:16 +000015088# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015089ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015090
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015091ac_config_files="$ac_config_files Modules/ld_so_aix"
15092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015094# This file is a shell script that caches the results of configure
15095# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015096# scripts and configure runs, see configure's option --config-cache.
15097# It is not useful on other systems. If it contains results you don't
15098# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015099#
Martin v. Löwis11437992002-04-12 09:54:03 +000015100# config.status only pays attention to the cache file if you give it
15101# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015102#
Skip Montanaro6dead952003-09-25 14:50:04 +000015103# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015104# loading this file, other *unset* `ac_cv_foo' will be assigned the
15105# following values.
15106
15107_ACEOF
15108
Guido van Rossumf78abae1997-01-21 22:02:36 +000015109# The following way of writing the cache mishandles newlines in values,
15110# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015112# Ultrix sh set writes to stderr and can't be redirected directly,
15113# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114(
15115 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15116 eval ac_val=\$$ac_var
15117 case $ac_val in #(
15118 *${as_nl}*)
15119 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15121$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122 esac
15123 case $ac_var in #(
15124 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15126 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 esac ;;
15128 esac
15129 done
15130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15133 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 # `set' does not quote correctly, so add quotes: double-quote
15135 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015137 "s/'/'\\\\''/g;
15138 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 *)
15141 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 esac |
15145 sort
15146) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15152 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15154 :end' >>confcache
15155if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15156 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015157 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15159$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015160 if test ! -f "$cache_file" || test -h "$cache_file"; then
15161 cat confcache >"$cache_file"
15162 else
15163 case $cache_file in #(
15164 */* | ?:*)
15165 mv -f confcache "$cache_file"$$ &&
15166 mv -f "$cache_file"$$ "$cache_file" ;; #(
15167 *)
15168 mv -f confcache "$cache_file" ;;
15169 esac
15170 fi
15171 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015172 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15174$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015175 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015177rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015178
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015179test "x$prefix" = xNONE && prefix=$ac_default_prefix
15180# Let make expand exec_prefix.
15181test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015183DEFS=-DHAVE_CONFIG_H
15184
Skip Montanaro6dead952003-09-25 14:50:04 +000015185ac_libobjs=
15186ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015187U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015188for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15189 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15193 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15195 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015196done
15197LIBOBJS=$ac_libobjs
15198
15199LTLIBOBJS=$ac_ltlibobjs
15200
15201
Martin v. Löwis11437992002-04-12 09:54:03 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203
Victor Stinnere0be4232011-10-25 13:06:09 +020015204: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015205ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015206ac_clean_files_save=$ac_clean_files
15207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015208{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15209$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15210as_write_fail=0
15211cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015212#! $SHELL
15213# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015215# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015216# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015217
Martin v. Löwis11437992002-04-12 09:54:03 +000015218debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015219ac_cs_recheck=false
15220ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222SHELL=\${CONFIG_SHELL-$SHELL}
15223export SHELL
15224_ASEOF
15225cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15226## -------------------- ##
15227## M4sh Initialization. ##
15228## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230# Be more Bourne compatible
15231DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015232if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 emulate sh
15234 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015236 # is contrary to our usage. Disable this feature.
15237 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015239else
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 case `(set -o) 2>/dev/null` in #(
15241 *posix*) :
15242 set -o posix ;; #(
15243 *) :
15244 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015246fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015247
15248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249as_nl='
15250'
15251export as_nl
15252# Printing a long string crashes Solaris 7 /usr/bin/printf.
15253as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15254as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15255as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15256# Prefer a ksh shell builtin over an external printf program on Solaris,
15257# but without wasting forks for bash or zsh.
15258if test -z "$BASH_VERSION$ZSH_VERSION" \
15259 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15260 as_echo='print -r --'
15261 as_echo_n='print -rn --'
15262elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15263 as_echo='printf %s\n'
15264 as_echo_n='printf %s'
15265else
15266 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15267 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15268 as_echo_n='/usr/ucb/echo -n'
15269 else
15270 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15271 as_echo_n_body='eval
15272 arg=$1;
15273 case $arg in #(
15274 *"$as_nl"*)
15275 expr "X$arg" : "X\\(.*\\)$as_nl";
15276 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15277 esac;
15278 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15279 '
15280 export as_echo_n_body
15281 as_echo_n='sh -c $as_echo_n_body as_echo'
15282 fi
15283 export as_echo_body
15284 as_echo='sh -c $as_echo_body as_echo'
15285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015286
15287# The user is always right.
15288if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 PATH_SEPARATOR=:
15290 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15291 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15292 PATH_SEPARATOR=';'
15293 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296
15297# IFS
15298# We need space, tab and new line, in precisely that order. Quoting is
15299# there to prevent editors from complaining about space-tab.
15300# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15301# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302IFS=" "" $as_nl"
15303
15304# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015305as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015306case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307 *[\\/]* ) as_myself=$0 ;;
15308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015309for as_dir in $PATH
15310do
15311 IFS=$as_save_IFS
15312 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15314 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317 ;;
15318esac
15319# We did not find ourselves, most probably we were run as `sh COMMAND'
15320# in which case we are not to be found in the path.
15321if test "x$as_myself" = x; then
15322 as_myself=$0
15323fi
15324if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15326 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327fi
15328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329# Unset variables that we do not need and which cause bugs (e.g. in
15330# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15331# suppresses any "Segmentation fault" message there. '((' could
15332# trigger a bug in pdksh 5.2.14.
15333for as_var in BASH_ENV ENV MAIL MAILPATH
15334do eval test x\${$as_var+set} = xset \
15335 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336done
15337PS1='$ '
15338PS2='> '
15339PS4='+ '
15340
15341# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015342LC_ALL=C
15343export LC_ALL
15344LANGUAGE=C
15345export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347# CDPATH.
15348(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15349
15350
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015351# as_fn_error STATUS ERROR [LINENO LOG_FD]
15352# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015353# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15354# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015355# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015356as_fn_error ()
15357{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015358 as_status=$1; test $as_status -eq 0 && as_status=1
15359 if test "$4"; then
15360 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15361 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015363 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 as_fn_exit $as_status
15365} # as_fn_error
15366
15367
15368# as_fn_set_status STATUS
15369# -----------------------
15370# Set $? to STATUS, without forking.
15371as_fn_set_status ()
15372{
15373 return $1
15374} # as_fn_set_status
15375
15376# as_fn_exit STATUS
15377# -----------------
15378# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15379as_fn_exit ()
15380{
15381 set +e
15382 as_fn_set_status $1
15383 exit $1
15384} # as_fn_exit
15385
15386# as_fn_unset VAR
15387# ---------------
15388# Portably unset VAR.
15389as_fn_unset ()
15390{
15391 { eval $1=; unset $1;}
15392}
15393as_unset=as_fn_unset
15394# as_fn_append VAR VALUE
15395# ----------------------
15396# Append the text in VALUE to the end of the definition contained in VAR. Take
15397# advantage of any shell optimizations that allow amortized linear growth over
15398# repeated appends, instead of the typical quadratic growth present in naive
15399# implementations.
15400if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15401 eval 'as_fn_append ()
15402 {
15403 eval $1+=\$2
15404 }'
15405else
15406 as_fn_append ()
15407 {
15408 eval $1=\$$1\$2
15409 }
15410fi # as_fn_append
15411
15412# as_fn_arith ARG...
15413# ------------------
15414# Perform arithmetic evaluation on the ARGs, and store the result in the
15415# global $as_val. Take advantage of shells that can avoid forks. The arguments
15416# must be portable across $(()) and expr.
15417if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15418 eval 'as_fn_arith ()
15419 {
15420 as_val=$(( $* ))
15421 }'
15422else
15423 as_fn_arith ()
15424 {
15425 as_val=`expr "$@" || test $? -eq 1`
15426 }
15427fi # as_fn_arith
15428
15429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015430if expr a : '\(a\)' >/dev/null 2>&1 &&
15431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15432 as_expr=expr
15433else
15434 as_expr=false
15435fi
15436
15437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15438 as_basename=basename
15439else
15440 as_basename=false
15441fi
15442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15444 as_dirname=dirname
15445else
15446 as_dirname=false
15447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449as_me=`$as_basename -- "$0" ||
15450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15451 X"$0" : 'X\(//\)$' \| \
15452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454 sed '/^.*\/\([^/][^/]*\)\/*$/{
15455 s//\1/
15456 q
15457 }
15458 /^X\/\(\/\/\)$/{
15459 s//\1/
15460 q
15461 }
15462 /^X\/\(\/\).*/{
15463 s//\1/
15464 q
15465 }
15466 s/.*/./; q'`
15467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468# Avoid depending upon Character Ranges.
15469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15472as_cr_digits='0123456789'
15473as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474
15475ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015476case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015477-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 xy) ECHO_C='\c';;
15481 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15482 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483 esac;;
15484*)
15485 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015487
Martin v. Löwis11437992002-04-12 09:54:03 +000015488rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489if test -d conf$$.dir; then
15490 rm -f conf$$.dir/conf$$.file
15491else
15492 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if (echo >conf$$.file) 2>/dev/null; then
15496 if ln -s conf$$.file conf$$ 2>/dev/null; then
15497 as_ln_s='ln -s'
15498 # ... but there are two gotchas:
15499 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15500 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Trent Nelsona4519a62012-10-16 11:51:08 -040015501 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015502 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Trent Nelsona4519a62012-10-16 11:51:08 -040015503 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 elif ln conf$$.file conf$$ 2>/dev/null; then
15505 as_ln_s=ln
15506 else
Trent Nelsona4519a62012-10-16 11:51:08 -040015507 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015509else
Trent Nelsona4519a62012-10-16 11:51:08 -040015510 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15513rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515
15516# as_fn_mkdir_p
15517# -------------
15518# Create "$as_dir" as a directory, including parents if necessary.
15519as_fn_mkdir_p ()
15520{
15521
15522 case $as_dir in #(
15523 -*) as_dir=./$as_dir;;
15524 esac
15525 test -d "$as_dir" || eval $as_mkdir_p || {
15526 as_dirs=
15527 while :; do
15528 case $as_dir in #(
15529 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15530 *) as_qdir=$as_dir;;
15531 esac
15532 as_dirs="'$as_qdir' $as_dirs"
15533 as_dir=`$as_dirname -- "$as_dir" ||
15534$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15535 X"$as_dir" : 'X\(//\)[^/]' \| \
15536 X"$as_dir" : 'X\(//\)$' \| \
15537 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15538$as_echo X"$as_dir" |
15539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15540 s//\1/
15541 q
15542 }
15543 /^X\(\/\/\)[^/].*/{
15544 s//\1/
15545 q
15546 }
15547 /^X\(\/\/\)$/{
15548 s//\1/
15549 q
15550 }
15551 /^X\(\/\).*/{
15552 s//\1/
15553 q
15554 }
15555 s/.*/./; q'`
15556 test -d "$as_dir" && break
15557 done
15558 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015559 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015560
15561
15562} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015563if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015565else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015566 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015567 as_mkdir_p=false
15568fi
15569
Trent Nelsona4519a62012-10-16 11:51:08 -040015570
15571# as_fn_executable_p FILE
15572# -----------------------
15573# Test if FILE is an executable regular file.
15574as_fn_executable_p ()
15575{
15576 test -f "$1" && test -x "$1"
15577} # as_fn_executable_p
15578as_test_x='test -x'
15579as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
15581# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015582as_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 +000015583
15584# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015589## ----------------------------------- ##
15590## Main body of $CONFIG_STATUS script. ##
15591## ----------------------------------- ##
15592_ASEOF
15593test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15596# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015597# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598# values after options handling.
15599ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015600This file was extended by python $as_me 3.4, which was
Trent Nelsona4519a62012-10-16 11:51:08 -040015601generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603 CONFIG_FILES = $CONFIG_FILES
15604 CONFIG_HEADERS = $CONFIG_HEADERS
15605 CONFIG_LINKS = $CONFIG_LINKS
15606 CONFIG_COMMANDS = $CONFIG_COMMANDS
15607 $ $0 $@
15608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609on `(hostname || uname -n) 2>/dev/null | sed 1q`
15610"
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612_ACEOF
15613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614case $ac_config_files in *"
15615"*) set x $ac_config_files; shift; ac_config_files=$*;;
15616esac
15617
15618case $ac_config_headers in *"
15619"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15620esac
15621
15622
15623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015624# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015625config_files="$ac_config_files"
15626config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015631ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015632\`$as_me' instantiates files and other configuration actions
15633from templates according to the current configuration. Unless the files
15634and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
15638 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 --config print configuration, then exit
15641 -q, --quiet, --silent
15642 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 -d, --debug don't remove temporary files
15644 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 --file=FILE[:TEMPLATE]
15646 instantiate the configuration file FILE
15647 --header=FILE[:TEMPLATE]
15648 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
15650Configuration files:
15651$config_files
15652
15653Configuration headers:
15654$config_headers
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15660ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015661ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015662python config.status 3.4
Trent Nelsona4519a62012-10-16 11:51:08 -040015663configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015665
Trent Nelsona4519a62012-10-16 11:51:08 -040015666Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015667This config.status script is free software; the Free Software Foundation
15668gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669
15670ac_pwd='$ac_pwd'
15671srcdir='$srcdir'
15672INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015673MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015674test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15678# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015679ac_need_defaults=:
15680while test $# != 0
15681do
15682 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015683 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15685 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015686 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015688 --*=)
15689 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15690 ac_optarg=
15691 ac_shift=:
15692 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015694 ac_option=$1
15695 ac_optarg=$2
15696 ac_shift=shift
15697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 esac
15699
Skip Montanaro6dead952003-09-25 14:50:04 +000015700 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015702 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15703 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015704 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 $as_echo "$ac_cs_version"; exit ;;
15706 --config | --confi | --conf | --con | --co | --c )
15707 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 debug=: ;;
15710 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015711 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 case $ac_optarg in
15713 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015714 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 esac
15716 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 ac_need_defaults=false;;
15718 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015719 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015720 case $ac_optarg in
15721 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15722 esac
15723 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725 --he | --h)
15726 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015727 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015728Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015731 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15732 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15733 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
15735 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015736 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015737Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015740 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015741
15742 esac
15743 shift
15744done
15745
Skip Montanaro6dead952003-09-25 14:50:04 +000015746ac_configure_extra_args=
15747
15748if $ac_cs_silent; then
15749 exec 6>/dev/null
15750 ac_configure_extra_args="$ac_configure_extra_args --silent"
15751fi
15752
15753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015754cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015755if \$ac_cs_recheck; then
Trent Nelsona4519a62012-10-16 11:51:08 -040015756 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 shift
15758 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15759 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015762fi
15763
Martin v. Löwis11437992002-04-12 09:54:03 +000015764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766exec 5>>config.log
15767{
15768 echo
15769 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15770## Running $as_me. ##
15771_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780
15781# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015782for ac_config_target in $ac_config_targets
15783do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784 case $ac_config_target in
15785 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15786 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15787 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015788 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15789 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15791 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015792 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015793 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794
Victor Stinnere0be4232011-10-25 13:06:09 +020015795 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 esac
15797done
15798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799
Martin v. Löwis11437992002-04-12 09:54:03 +000015800# If the user did not use the arguments to specify the items to instantiate,
15801# then the envvar interface is used. Set only those that are not.
15802# We use the long form for the default assignment because of an extremely
15803# bizarre bug on SunOS 4.1.3.
15804if $ac_need_defaults; then
15805 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15806 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15807fi
15808
Skip Montanaro6dead952003-09-25 14:50:04 +000015809# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015811# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812# Hook for its removal unless debugging.
15813# Note that there is a small window in which the directory will not be cleaned:
15814# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015815$debug ||
15816{
Victor Stinnere0be4232011-10-25 13:06:09 +020015817 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015819 : "${ac_tmp:=$tmp}"
15820 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015823}
Martin v. Löwis11437992002-04-12 09:54:03 +000015824# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015828 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015829} ||
15830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831 tmp=./conf$$-$RANDOM
15832 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015833} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015834ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
Matthias Kloseb9621712010-04-24 17:59:49 +000015836# Set up the scripts for CONFIG_FILES section.
15837# No need to generate them if there are no CONFIG_FILES.
15838# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841
15842ac_cr=`echo X | tr X '\015'`
15843# On cygwin, bash can eat \r inside `` if the user requested igncr.
15844# But we know of no other shell where ac_cr would be empty at this
15845# point, so we can use a bashism as a fallback.
15846if test "x$ac_cr" = x; then
15847 eval ac_cr=\$\'\\r\'
15848fi
15849ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15850if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015851 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015852else
15853 ac_cs_awk_cr=$ac_cr
15854fi
15855
Victor Stinnere0be4232011-10-25 13:06:09 +020015856echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015857_ACEOF
15858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{
15861 echo "cat >conf$$subs.awk <<_ACEOF" &&
15862 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15863 echo "_ACEOF"
15864} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015865 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15866ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867ac_delim='%!_!# '
15868for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015870 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15873 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 break
15875 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015876 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 else
15878 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880done
Matthias Kloseb9621712010-04-24 17:59:49 +000015881rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015884cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015886sed -n '
15887h
15888s/^/S["/; s/!.*/"]=/
15889p
15890g
15891s/^[^!]*!//
15892:repl
15893t repl
15894s/'"$ac_delim"'$//
15895t delim
15896:nl
15897h
15898s/\(.\{148\}\)..*/\1/
15899t more1
15900s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15901p
15902n
15903b repl
15904:more1
15905s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15906p
15907g
15908s/.\{148\}//
15909t nl
15910:delim
15911h
15912s/\(.\{148\}\)..*/\1/
15913t more2
15914s/["\\]/\\&/g; s/^/"/; s/$/"/
15915p
15916b
15917:more2
15918s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15919p
15920g
15921s/.\{148\}//
15922t delim
15923' <conf$$subs.awk | sed '
15924/^[^""]/{
15925 N
15926 s/\n//
15927}
15928' >>$CONFIG_STATUS || ac_write_fail=1
15929rm -f conf$$subs.awk
15930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15931_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015932cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 for (key in S) S_is_set[key] = 1
15934 FS = ""
15935
15936}
15937{
15938 line = $ 0
15939 nfields = split(line, field, "@")
15940 substed = 0
15941 len = length(field[1])
15942 for (i = 2; i < nfields; i++) {
15943 key = field[i]
15944 keylen = length(key)
15945 if (S_is_set[key]) {
15946 value = S[key]
15947 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15948 len += length(value) + length(field[++i])
15949 substed = 1
15950 } else
15951 len += 1 + keylen
15952 }
15953
15954 print line
15955}
15956
15957_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15960if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15961 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15962else
15963 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015964fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015965 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015966_ACEOF
15967
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015968# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15969# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970# trailing colons and then remove the whole line if VPATH becomes empty
15971# (actually we leave an empty line to preserve line numbers).
15972if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015973 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15974h
15975s///
15976s/^/:/
15977s/[ ]*$/:/
15978s/:\$(srcdir):/:/g
15979s/:\${srcdir}:/:/g
15980s/:@srcdir@:/:/g
15981s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015983x
15984s/\(=[ ]*\).*/\1/
15985G
15986s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987s/^[^=]*=[ ]*$//
15988}'
15989fi
15990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015992fi # test -n "$CONFIG_FILES"
15993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994# Set up the scripts for CONFIG_HEADERS section.
15995# No need to generate them if there are no CONFIG_HEADERS.
15996# This happens for instance with `./config.status Makefile'.
15997if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015998cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015999BEGIN {
16000_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002# Transform confdefs.h into an awk script `defines.awk', embedded as
16003# here-document in config.status, that substitutes the proper values into
16004# config.h.in to produce config.h.
16005
16006# Create a delimiter string that does not exist in confdefs.h, to ease
16007# handling of long lines.
16008ac_delim='%!_!# '
16009for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016010 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16011 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 break
16013 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016014 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 else
16016 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16017 fi
16018done
16019
16020# For the awk script, D is an array of macro values keyed by name,
16021# likewise P contains macro parameters if any. Preserve backslash
16022# newline sequences.
16023
16024ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16025sed -n '
16026s/.\{148\}/&'"$ac_delim"'/g
16027t rset
16028:rset
16029s/^[ ]*#[ ]*define[ ][ ]*/ /
16030t def
16031d
16032:def
16033s/\\$//
16034t bsnl
16035s/["\\]/\\&/g
16036s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16037D["\1"]=" \3"/p
16038s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16039d
16040:bsnl
16041s/["\\]/\\&/g
16042s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16043D["\1"]=" \3\\\\\\n"\\/p
16044t cont
16045s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16046t cont
16047d
16048:cont
16049n
16050s/.\{148\}/&'"$ac_delim"'/g
16051t clear
16052:clear
16053s/\\$//
16054t bsnlc
16055s/["\\]/\\&/g; s/^/"/; s/$/"/p
16056d
16057:bsnlc
16058s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16059b cont
16060' <confdefs.h | sed '
16061s/'"$ac_delim"'/"\\\
16062"/g' >>$CONFIG_STATUS || ac_write_fail=1
16063
16064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16065 for (key in D) D_is_set[key] = 1
16066 FS = ""
16067}
16068/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16069 line = \$ 0
16070 split(line, arg, " ")
16071 if (arg[1] == "#") {
16072 defundef = arg[2]
16073 mac1 = arg[3]
16074 } else {
16075 defundef = substr(arg[1], 2)
16076 mac1 = arg[2]
16077 }
16078 split(mac1, mac2, "(") #)
16079 macro = mac2[1]
16080 prefix = substr(line, 1, index(line, defundef) - 1)
16081 if (D_is_set[macro]) {
16082 # Preserve the white space surrounding the "#".
16083 print prefix "define", macro P[macro] D[macro]
16084 next
16085 } else {
16086 # Replace #undef with comments. This is necessary, for example,
16087 # in the case of _POSIX_SOURCE, which is predefined and required
16088 # on some systems where configure will not decide to define it.
16089 if (defundef == "undef") {
16090 print "/*", prefix defundef, macro, "*/"
16091 next
16092 }
16093 }
16094}
16095{ print }
16096_ACAWK
16097_ACEOF
16098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016099 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016100fi # test -n "$CONFIG_HEADERS"
16101
16102
16103eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16104shift
16105for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106do
16107 case $ac_tag in
16108 :[FHLC]) ac_mode=$ac_tag; continue;;
16109 esac
16110 case $ac_mode$ac_tag in
16111 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016112 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113 :[FH]-) ac_tag=-:-;;
16114 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16115 esac
16116 ac_save_IFS=$IFS
16117 IFS=:
16118 set x $ac_tag
16119 IFS=$ac_save_IFS
16120 shift
16121 ac_file=$1
16122 shift
16123
16124 case $ac_mode in
16125 :L) ac_source=$1;;
16126 :[FH])
16127 ac_file_inputs=
16128 for ac_f
16129 do
16130 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016131 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132 *) # Look for the file first in the build tree, then in the source tree
16133 # (if the path is not absolute). The absolute path cannot be DOS-style,
16134 # because $ac_f cannot contain `:'.
16135 test -f "$ac_f" ||
16136 case $ac_f in
16137 [\\/$]*) false;;
16138 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16139 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016140 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016142 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16143 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 done
16145
16146 # Let's still pretend it is `configure' which instantiates (i.e., don't
16147 # use $as_me), people would be surprised to read:
16148 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016149 configure_input='Generated from '`
16150 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16151 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152 if test x"$ac_file" != x-; then
16153 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16155$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 # Neutralize special characters interpreted by sed in replacement strings.
16158 case $configure_input in #(
16159 *\&* | *\|* | *\\* )
16160 ac_sed_conf_input=`$as_echo "$configure_input" |
16161 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16162 *) ac_sed_conf_input=$configure_input;;
16163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164
16165 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016166 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16167 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 esac
16169 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 esac
16171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016173$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 X"$ac_file" : 'X\(//\)[^/]' \| \
16175 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016177$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16179 s//\1/
16180 q
16181 }
16182 /^X\(\/\/\)[^/].*/{
16183 s//\1/
16184 q
16185 }
16186 /^X\(\/\/\)$/{
16187 s//\1/
16188 q
16189 }
16190 /^X\(\/\).*/{
16191 s//\1/
16192 q
16193 }
16194 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016195 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 ac_builddir=.
16197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198case "$ac_dir" in
16199.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16200*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 case $ac_top_builddir_sub in
16205 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16206 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16207 esac ;;
16208esac
16209ac_abs_top_builddir=$ac_pwd
16210ac_abs_builddir=$ac_pwd$ac_dir_suffix
16211# for backward compatibility:
16212ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016213
16214case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217 ac_top_srcdir=$ac_top_builddir_sub
16218 ac_abs_top_srcdir=$ac_pwd ;;
16219 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221 ac_top_srcdir=$srcdir
16222 ac_abs_top_srcdir=$srcdir ;;
16223 *) # Relative name.
16224 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16225 ac_top_srcdir=$ac_top_build_prefix$srcdir
16226 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016227esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016229
Martin v. Löwis11437992002-04-12 09:54:03 +000016230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 case $ac_mode in
16232 :F)
16233 #
16234 # CONFIG_FILE
16235 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016236
16237 case $INSTALL in
16238 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016241 ac_MKDIR_P=$MKDIR_P
16242 case $MKDIR_P in
16243 [\\/$]* | ?:[\\/]* ) ;;
16244 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16245 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016246_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249# If the template does not know about datarootdir, expand it.
16250# FIXME: This hack should be removed a few years after 2.60.
16251ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016252ac_sed_dataroot='
16253/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 p
16255 q
16256}
16257/@datadir@/p
16258/@docdir@/p
16259/@infodir@/p
16260/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016261/@mandir@/p'
16262case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263*datarootdir*) ac_datarootdir_seen=yes;;
16264*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16266$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 ac_datarootdir_hack='
16270 s&@datadir@&$datadir&g
16271 s&@docdir@&$docdir&g
16272 s&@infodir@&$infodir&g
16273 s&@localedir@&$localedir&g
16274 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276esac
16277_ACEOF
16278
16279# Neutralize VPATH when `$srcdir' = `.'.
16280# Shell code in configure.ac might set extrasub.
16281# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16283ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016284$extrasub
16285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016287:t
16288/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016289s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016291s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292s&@srcdir@&$ac_srcdir&;t t
16293s&@abs_srcdir@&$ac_abs_srcdir&;t t
16294s&@top_srcdir@&$ac_top_srcdir&;t t
16295s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16296s&@builddir@&$ac_builddir&;t t
16297s&@abs_builddir@&$ac_abs_builddir&;t t
16298s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16299s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016300s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016302"
Victor Stinnere0be4232011-10-25 13:06:09 +020016303eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16304 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016307 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16308 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16309 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016311which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016312$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016313which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016314
Victor Stinnere0be4232011-10-25 13:06:09 +020016315 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016317 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16318 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016320 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 ;;
16322 :H)
16323 #
16324 # CONFIG_HEADER
16325 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 {
16328 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016329 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16330 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016331 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016332 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016333 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16334$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016336 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016337 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 fi
16340 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016342 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016343 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347
16348 esac
16349
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016350
16351 case $ac_file$ac_mode in
16352 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16353
16354 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355done # for ac_tag
16356
Guido van Rossum627b2d71993-12-24 10:39:16 +000016357
Matthias Kloseb9621712010-04-24 17:59:49 +000016358as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016359_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016360ac_clean_files=$ac_clean_files_save
16361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016364
Martin v. Löwis11437992002-04-12 09:54:03 +000016365
16366# configure is writing to config.log, and then calls config.status.
16367# config.status does its own redirection, appending to config.log.
16368# Unfortunately, on DOS this fails, as config.log is still kept open
16369# by configure, so config.status won't be able to write to it; its
16370# output is simply discarded. So we exec the FD to /dev/null,
16371# effectively closing config.log, so it can be properly (re)opened and
16372# appended to by config.status. When coming back to configure, we
16373# need to make the FD available again.
16374if test "$no_create" != yes; then
16375 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016376 ac_config_status_args=
16377 test "$silent" = yes &&
16378 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016379 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016380 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 exec 5>>config.log
16382 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16383 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016384 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016385fi
16386if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16388$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016389fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016390
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016391
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016392echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016393if test ! -f Modules/Setup
16394then
16395 cp $srcdir/Modules/Setup.dist Modules/Setup
16396fi
16397
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016398echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016399if test ! -f Modules/Setup.local
16400then
16401 echo "# Edit this file for local setup changes" >Modules/Setup.local
16402fi
16403
16404echo "creating Makefile"
16405$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16406 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016407 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016408mv config.c Modules