blob: c44c8b6caf934ab700353c122cf6c663698b6bd3 [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000738target_alias
739host_alias
740build_alias
741LIBS
742ECHO_T
743ECHO_N
744ECHO_C
745DEFS
746mandir
747localedir
748libdir
749psdir
750pdfdir
751dvidir
752htmldir
753infodir
754docdir
755oldincludedir
756includedir
757localstatedir
758sharedstatedir
759sysconfdir
760datadir
761datarootdir
762libexecdir
763sbindir
764bindir
765program_transform_name
766prefix
767exec_prefix
768PACKAGE_URL
769PACKAGE_BUGREPORT
770PACKAGE_STRING
771PACKAGE_VERSION
772PACKAGE_TARNAME
773PACKAGE_NAME
774PATH_SEPARATOR
775SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000776ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000777ac_user_opts='
778enable_option_checking
779enable_universalsdk
780with_universal_archs
781with_framework_name
782enable_framework
783with_gcc
784with_cxx_main
785with_suffix
786enable_shared
787enable_profiling
788with_pydebug
789with_libs
790with_system_expat
791with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100792with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000793enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000794with_dbmliborder
795with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_threads
797with_thread
798enable_ipv6
799with_doc_strings
800with_tsc
801with_pymalloc
802with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_fpectl
804with_libm
805with_libc
806enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_computed_gotos
808'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 ac_precious_vars='build_alias
810host_alias
811target_alias
812CC
813CFLAGS
814LDFLAGS
815LIBS
816CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200817CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000821ac_init_help=
822ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000823ac_unrecognized_opts=
824ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825# The variables have the same names as the options, with
826# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000827cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830no_recursion=
831prefix=NONE
832program_prefix=NONE
833program_suffix=NONE
834program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839x_includes=NONE
840x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000841
842# Installation directory options.
843# These are left unexpanded so users can "make install exec_prefix=/foo"
844# and all the variables that are supposed to be based on exec_prefix
845# by default will actually change.
846# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848bindir='${exec_prefix}/bin'
849sbindir='${exec_prefix}/sbin'
850libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851datarootdir='${prefix}/share'
852datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853sysconfdir='${prefix}/etc'
854sharedstatedir='${prefix}/com'
855localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856includedir='${prefix}/include'
857oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
859infodir='${datarootdir}/info'
860htmldir='${docdir}'
861dvidir='${docdir}'
862pdfdir='${docdir}'
863psdir='${docdir}'
864libdir='${exec_prefix}/lib'
865localedir='${datarootdir}/locale'
866mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 # If the previous option needs an argument, assign it.
873 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 ac_prev=
876 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200880 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
881 *=) ac_optarg= ;;
882 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Accept the important Cygnus configure options, so we can diagnose typos.
886
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 case $ac_dashdash$ac_option in
888 --)
889 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -bindir | --bindir | --bindi | --bind | --bin | --bi)
892 ac_prev=bindir ;;
893 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
896 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 -cache-file | --cache-file | --cache-fil | --cache-fi \
902 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
903 ac_prev=cache_file ;;
904 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
905 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 cache_file=$ac_optarg ;;
907
908 --config-cache | -C)
909 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
917 | --dataroo | --dataro | --datar)
918 ac_prev=datarootdir ;;
919 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
920 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
921 datarootdir=$ac_optarg ;;
922
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200927 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 ac_useropt_orig=$ac_useropt
929 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
930 case $ac_user_opts in
931 *"
932"enable_$ac_useropt"
933"*) ;;
934 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
935 ac_unrecognized_sep=', ';;
936 esac
937 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938
939 -docdir | --docdir | --docdi | --doc | --do)
940 ac_prev=docdir ;;
941 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
942 docdir=$ac_optarg ;;
943
944 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
945 ac_prev=dvidir ;;
946 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
947 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200953 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
966 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
967 | --exec | --exe | --ex)
968 ac_prev=exec_prefix ;;
969 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
970 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
971 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Obsolete; use --with-gas.
976 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 -help | --help | --hel | --he | -h)
979 ac_init_help=long ;;
980 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
981 ac_init_help=recursive ;;
982 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
983 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
991 ac_prev=htmldir ;;
992 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
993 | --ht=*)
994 htmldir=$ac_optarg ;;
995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -includedir | --includedir | --includedi | --included | --include \
997 | --includ | --inclu | --incl | --inc)
998 ac_prev=includedir ;;
999 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1000 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
1003 -infodir | --infodir | --infodi | --infod | --info | --inf)
1004 ac_prev=infodir ;;
1005 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -libdir | --libdir | --libdi | --libd)
1009 ac_prev=libdir ;;
1010 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1014 | --libexe | --libex | --libe)
1015 ac_prev=libexecdir ;;
1016 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1017 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 -localedir | --localedir | --localedi | --localed | --locale)
1021 ac_prev=localedir ;;
1022 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1023 localedir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 ac_prev=localstatedir ;;
1028 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1033 ac_prev=mandir ;;
1034 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --without-fp.
1039 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 no_create=yes ;;
1044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1046 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1047 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1050 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1051 | --oldin | --oldi | --old | --ol | --o)
1052 ac_prev=oldincludedir ;;
1053 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1054 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1055 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1059 ac_prev=prefix ;;
1060 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1064 | --program-pre | --program-pr | --program-p)
1065 ac_prev=program_prefix ;;
1066 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1067 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1071 | --program-suf | --program-su | --program-s)
1072 ac_prev=program_suffix ;;
1073 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1074 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-transform-name | --program-transform-name \
1078 | --program-transform-nam | --program-transform-na \
1079 | --program-transform-n | --program-transform- \
1080 | --program-transform | --program-transfor \
1081 | --program-transfo | --program-transf \
1082 | --program-trans | --program-tran \
1083 | --progr-tra | --program-tr | --program-t)
1084 ac_prev=program_transform_name ;;
1085 -program-transform-name=* | --program-transform-name=* \
1086 | --program-transform-nam=* | --program-transform-na=* \
1087 | --program-transform-n=* | --program-transform-=* \
1088 | --program-transform=* | --program-transfor=* \
1089 | --program-transfo=* | --program-transf=* \
1090 | --program-trans=* | --program-tran=* \
1091 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001094 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1095 ac_prev=pdfdir ;;
1096 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1097 pdfdir=$ac_optarg ;;
1098
1099 -psdir | --psdir | --psdi | --psd | --ps)
1100 ac_prev=psdir ;;
1101 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1102 psdir=$ac_optarg ;;
1103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1105 | -silent | --silent | --silen | --sile | --sil)
1106 silent=yes ;;
1107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1109 ac_prev=sbindir ;;
1110 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1111 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
1114 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1115 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1116 | --sharedst | --shareds | --shared | --share | --shar \
1117 | --sha | --sh)
1118 ac_prev=sharedstatedir ;;
1119 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1120 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1121 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1122 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 -site | --site | --sit)
1126 ac_prev=site ;;
1127 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1131 ac_prev=srcdir ;;
1132 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1136 | --syscon | --sysco | --sysc | --sys | --sy)
1137 ac_prev=sysconfdir ;;
1138 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1139 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1148 verbose=yes ;;
1149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 -version | --version | --versio | --versi | --vers | -V)
1151 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001157 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 ac_useropt_orig=$ac_useropt
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 --x)
1186 # Obsolete; use --with-x.
1187 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1190 | --x-incl | --x-inc | --x-in | --x-i)
1191 ac_prev=x_includes ;;
1192 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1193 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1197 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1198 ac_prev=x_libraries ;;
1199 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1200 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1204Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 *=*)
1208 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 case $ac_envvar in #(
1211 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 export $ac_envvar ;;
1216
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001222 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 ;;
1224
1225 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226done
1227
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231fi
1232
Matthias Kloseb9621712010-04-24 17:59:49 +00001233if test -n "$ac_unrecognized_opts"; then
1234 case $enable_option_checking in
1235 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1238 esac
1239fi
1240
1241# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1243 datadir sysconfdir sharedstatedir localstatedir includedir \
1244 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1245 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 # Remove trailing slashes.
1249 case $ac_val in
1250 */ )
1251 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1252 eval $ac_var=\$ac_val;;
1253 esac
1254 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 [\\/$]* | ?:[\\/]* ) continue;;
1257 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001260done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# There might be people who depend on the old broken behavior: `$host'
1263# used to hold the argument of --host etc.
1264# FIXME: To remove some day.
1265build=$build_alias
1266host=$host_alias
1267target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269# FIXME: To remove some day.
1270if test "x$host_alias" != x; then
1271 if test "x$build_alias" = x; then
1272 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 elif test "x$build_alias" != "x$host_alias"; then
1274 cross_compiling=yes
1275 fi
1276fi
1277
1278ac_tool_prefix=
1279test -n "$host_alias" && ac_tool_prefix=$host_alias-
1280
1281test "$silent" = yes && exec 6>/dev/null
1282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284ac_pwd=`pwd` && test -n "$ac_pwd" &&
1285ac_ls_di=`ls -di .` &&
1286ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292# Find the source files, if location was not specified.
1293if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 ac_confdir=`$as_dirname -- "$as_myself" ||
1297$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1298 X"$as_myself" : 'X\(//\)[^/]' \| \
1299 X"$as_myself" : 'X\(//\)$' \| \
1300 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1301$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1303 s//\1/
1304 q
1305 }
1306 /^X\(\/\/\)[^/].*/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)$/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\).*/{
1315 s//\1/
1316 q
1317 }
1318 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321 srcdir=..
1322 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
1324 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326if test ! -r "$srcdir/$ac_unique_file"; then
1327 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1331ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 pwd)`
1334# When building in place, set srcdir=.
1335if test "$ac_abs_confdir" = "$ac_pwd"; then
1336 srcdir=.
1337fi
1338# Remove unnecessary trailing slashes from srcdir.
1339# Double slashes in file names in object file debugging info
1340# mess up M-x gdb in Emacs.
1341case $srcdir in
1342*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1343esac
1344for ac_var in $ac_precious_vars; do
1345 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_env_${ac_var}_value=\$${ac_var}
1347 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1349done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350
Martin v. Löwis11437992002-04-12 09:54:03 +00001351#
1352# Report the --help message.
1353#
1354if test "$ac_init_help" = "long"; then
1355 # Omit some internal or obsolete options to make the list less imposing.
1356 # This message is too long to be a string in the A/UX 3.1 sh.
1357 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001358\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
1360Usage: $0 [OPTION]... [VAR=VALUE]...
1361
1362To assign environment variables (e.g., CC, CFLAGS...), specify them as
1363VAR=VALUE. See below for descriptions of some of the useful variables.
1364
1365Defaults for the options are specified in brackets.
1366
1367Configuration:
1368 -h, --help display this help and exit
1369 --help=short display options specific to this package
1370 --help=recursive display the short help of all the included packages
1371 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --cache-file=FILE cache test results in FILE [disabled]
1374 -C, --config-cache alias for \`--cache-file=config.cache'
1375 -n, --no-create do not create output files
1376 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378Installation directories:
1379 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001380 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
1384By default, \`make install' will install all the files in
1385\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1386an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1387for instance \`--prefix=\$HOME'.
1388
1389For better control, use the options below.
1390
1391Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 --bindir=DIR user executables [EPREFIX/bin]
1393 --sbindir=DIR system admin executables [EPREFIX/sbin]
1394 --libexecdir=DIR program executables [EPREFIX/libexec]
1395 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1396 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1397 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1398 --libdir=DIR object code libraries [EPREFIX/lib]
1399 --includedir=DIR C header files [PREFIX/include]
1400 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1401 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1402 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1403 --infodir=DIR info documentation [DATAROOTDIR/info]
1404 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1405 --mandir=DIR man documentation [DATAROOTDIR/man]
1406 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1407 --htmldir=DIR html documentation [DOCDIR]
1408 --dvidir=DIR dvi documentation [DOCDIR]
1409 --pdfdir=DIR pdf documentation [DOCDIR]
1410 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412
1413 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001414
1415System types:
1416 --build=BUILD configure for building on BUILD [guessed]
1417 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418_ACEOF
1419fi
1420
1421if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001423 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 cat <<\_ACEOF
1426
1427Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1430 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001431 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001432 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --enable-framework[=INSTALLDIR]
1434 Build (MacOSX|Darwin) framework
1435 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001436 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001437 --enable-loadable-sqlite-extensions
1438 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-ipv6 Enable ipv6 (with ipv4) support
1440 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001441 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Optional Packages:
1445 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1446 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001447 --with-universal-archs=ARCH
1448 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001449 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001450 --with-framework-name=FRAMEWORK
1451 specify an alternate name of the framework built
1452 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001454 --with-cxx-main=<compiler>
1455 compile main() and link python executable with C++
1456 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with-suffix=.exe set executable suffix
1458 --with-pydebug build with Py_DEBUG defined
1459 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001460 --with-system-expat build pyexpat module using an installed expat
1461 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001462 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001463 --with-system-libmpdec build _decimal module using an installed libmpdec
1464 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001465 --with-dbmliborder=db1:db2:...
1466 order to check db backends for dbm. Valid value is a
1467 colon separated string with the backend names
1468 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with(out)-threads[=DIRECTORY]
1471 disable/enable thread support
1472 --with(out)-thread[=DIRECTORY]
1473 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001475 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001477 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001481 --with(out)-computed-gotos
1482 Use computed gotos in evaluation loop (enabled by
1483 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485Some influential environment variables:
1486 CC C compiler command
1487 CFLAGS C compiler flags
1488 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1489 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 CPP C preprocessor
1494
1495Use these variables to override the choices made by `configure' or to help
1496it to find libraries and programs with nonstandard names/locations.
1497
Georg Brandle2e15612009-05-20 18:25:10 +00001498Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001501fi
1502
1503if test "$ac_init_help" = "recursive"; then
1504 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001506 test -d "$ac_dir" ||
1507 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1508 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 ac_builddir=.
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511case "$ac_dir" in
1512.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1513*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001516 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 case $ac_top_builddir_sub in
1518 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1519 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1520 esac ;;
1521esac
1522ac_abs_top_builddir=$ac_pwd
1523ac_abs_builddir=$ac_pwd$ac_dir_suffix
1524# for backward compatibility:
1525ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 ac_top_srcdir=$ac_top_builddir_sub
1531 ac_abs_top_srcdir=$ac_pwd ;;
1532 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$srcdir
1535 ac_abs_top_srcdir=$srcdir ;;
1536 *) # Relative name.
1537 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1538 ac_top_srcdir=$ac_top_build_prefix$srcdir
1539 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001540esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 cd "$ac_dir" || { ac_status=$?; continue; }
1544 # Check for guested configure.
1545 if test -f "$ac_srcdir/configure.gnu"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1548 elif test -f "$ac_srcdir/configure"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 fi || ac_status=$?
1554 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 done
1556fi
1557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001559if $ac_init_version; then
1560 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001561python configure 3.4
Trent Nelsona4519a62012-10-16 11:51:08 -04001562generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Trent Nelsona4519a62012-10-16 11:51:08 -04001564Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565This configure script is free software; the Free Software Foundation
1566gives unlimited permission to copy, distribute and modify it.
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001570
1571## ------------------------ ##
1572## Autoconf initialization. ##
1573## ------------------------ ##
1574
1575# ac_fn_c_try_compile LINENO
1576# --------------------------
1577# Try to compile conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_compile ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 rm -f conftest.$ac_objext
1582 if { { ac_try="$ac_compile"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_compile") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; } && {
1598 test -z "$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 } && test -s conftest.$ac_objext; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 as_fn_set_status $ac_retval
1610
1611} # ac_fn_c_try_compile
1612
Matthias Kloseb9621712010-04-24 17:59:49 +00001613# ac_fn_c_try_link LINENO
1614# -----------------------
1615# Try to link conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_link ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext conftest$ac_exeext
1620 if { { ac_try="$ac_link"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_link") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest$ac_exeext && {
1639 test "$cross_compiling" = yes ||
Trent Nelsona4519a62012-10-16 11:51:08 -04001640 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 }; then :
1642 ac_retval=0
1643else
1644 $as_echo "$as_me: failed program was:" >&5
1645sed 's/^/| /' conftest.$ac_ext >&5
1646
1647 ac_retval=1
1648fi
1649 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1650 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1651 # interfere with the next link command; also delete a directory that is
1652 # left behind by Apple's compiler. We do this before executing the actions.
1653 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 as_fn_set_status $ac_retval
1656
1657} # ac_fn_c_try_link
1658
Matthias Kloseb9621712010-04-24 17:59:49 +00001659# ac_fn_c_try_cpp LINENO
1660# ----------------------
1661# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_cpp ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 if { { ac_try="$ac_cpp conftest.$ac_ext"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001680 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 }; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_cpp
1695
1696# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1697# -------------------------------------------------------
1698# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1699# the include files in INCLUDES and setting the cache variable VAR
1700# accordingly.
1701ac_fn_c_check_header_mongrel ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001704 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001707if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 $as_echo_n "(cached) " >&6
1709fi
1710eval ac_res=\$$3
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1712$as_echo "$ac_res" >&6; }
1713else
1714 # Is the header compilable?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1716$as_echo_n "checking $2 usability... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719$4
1720#include <$2>
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723 ac_header_compiler=yes
1724else
1725 ac_header_compiler=no
1726fi
1727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1729$as_echo "$ac_header_compiler" >&6; }
1730
1731# Is the header present?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1733$as_echo_n "checking $2 presence... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_cpp "$LINENO"; then :
1739 ac_header_preproc=yes
1740else
1741 ac_header_preproc=no
1742fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1745$as_echo "$ac_header_preproc" >&6; }
1746
1747# So? What about this header?
1748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1749 yes:no: )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1751$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1754 ;;
1755 no:yes:* )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1757$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1759$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1761$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1763$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001767## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001768## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 ) | sed "s/^/$as_me: WARNING: /" >&2
1770 ;;
1771esac
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1773$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001774if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 $as_echo_n "(cached) " >&6
1776else
1777 eval "$3=\$ac_header_compiler"
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001784
1785} # ac_fn_c_check_header_mongrel
1786
1787# ac_fn_c_try_run LINENO
1788# ----------------------
1789# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1790# that executables *can* be run.
1791ac_fn_c_try_run ()
1792{
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 if { { ac_try="$ac_link"
1795case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_link") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1805 { { case "(($ac_try" in
1806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807 *) ac_try_echo=$ac_try;;
1808esac
1809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810$as_echo "$ac_try_echo"; } >&5
1811 (eval "$ac_try") 2>&5
1812 ac_status=$?
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; }; }; then :
1815 ac_retval=0
1816else
1817 $as_echo "$as_me: program exited with status $ac_status" >&5
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=$ac_status
1822fi
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 as_fn_set_status $ac_retval
1826
1827} # ac_fn_c_try_run
1828
1829# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1830# -------------------------------------------------------
1831# Tests whether HEADER exists and can be compiled using the include files in
1832# INCLUDES, setting the cache variable VAR accordingly.
1833ac_fn_c_check_header_compile ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 $as_echo_n "(cached) " >&6
1840else
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844#include <$2>
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 eval "$3=yes"
1848else
1849 eval "$3=no"
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_compile
1859
Matthias Kloseb9621712010-04-24 17:59:49 +00001860# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1861# -------------------------------------------
1862# Tests whether TYPE exists after having included INCLUDES, setting cache
1863# variable VAR accordingly.
1864ac_fn_c_check_type ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001869if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876int
1877main ()
1878{
1879if (sizeof ($2))
1880 return 0;
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889int
1890main ()
1891{
1892if (sizeof (($2)))
1893 return 0;
1894 ;
1895 return 0;
1896}
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899
1900else
1901 eval "$3=yes"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906fi
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912} # ac_fn_c_check_type
1913
1914# ac_fn_c_find_uintX_t LINENO BITS VAR
1915# ------------------------------------
1916# Finds an unsigned integer type with width BITS, setting cache variable VAR
1917# accordingly.
1918ac_fn_c_find_uintX_t ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1922$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=no"
1927 # Order is important - never check a type that is potentially smaller
1928 # than half of the expected target width.
1929 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1930 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$ac_includes_default
1934int
1935main ()
1936{
1937static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Trent Nelsona4519a62012-10-16 11:51:08 -04001938test_array [0] = 0;
1939return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 case $ac_type in #(
1947 uint$2_t) :
1948 eval "$3=yes" ;; #(
1949 *) :
1950 eval "$3=\$ac_type" ;;
1951esac
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001954 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955
1956else
1957 break
1958fi
1959 done
1960fi
1961eval ac_res=\$$3
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001965
1966} # ac_fn_c_find_uintX_t
1967
1968# ac_fn_c_find_intX_t LINENO BITS VAR
1969# -----------------------------------
1970# Finds a signed integer type with width BITS, setting cache variable VAR
1971# accordingly.
1972ac_fn_c_find_intX_t ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1976$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001977if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978 $as_echo_n "(cached) " >&6
1979else
1980 eval "$3=no"
1981 # Order is important - never check a type that is potentially smaller
1982 # than half of the expected target width.
1983 for ac_type in int$2_t 'int' 'long int' \
1984 'long long int' 'short int' 'signed char'; do
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001989int
1990main ()
1991{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Trent Nelsona4519a62012-10-16 11:51:08 -04001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002004 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002005int
2006main ()
2007{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002009 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Trent Nelsona4519a62012-10-16 11:51:08 -04002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018
2019else
2020 case $ac_type in #(
2021 int$2_t) :
2022 eval "$3=yes" ;; #(
2023 *) :
2024 eval "$3=\$ac_type" ;;
2025esac
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002030 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032else
2033 break
2034fi
2035 done
2036fi
2037eval ac_res=\$$3
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042} # ac_fn_c_find_intX_t
2043
2044# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2045# --------------------------------------------
2046# Tries to find the compile-time value of EXPR in a program that includes
2047# INCLUDES, setting VAR accordingly. Returns whether the value could be
2048# computed
2049ac_fn_c_compute_int ()
2050{
2051 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052 if test "$cross_compiling" = yes; then
2053 # Depending upon the size, compute the lo and hi bounds.
2054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=0 ac_mid=0
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=$ac_mid; break
2087else
2088 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2089 if test $ac_lo -le $ac_mid; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) < 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=-1 ac_mid=-1
2114 while :; do
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=$ac_mid; break
2131else
2132 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2133 if test $ac_mid -le $ac_hi; then
2134 ac_lo= ac_hi=
2135 break
2136 fi
2137 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140 done
2141else
2142 ac_lo= ac_hi=
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147# Binary search between lo and hi bounds.
2148while test "x$ac_lo" != "x$ac_hi"; do
2149 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Trent Nelsona4519a62012-10-16 11:51:08 -04002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=$ac_mid
2166else
2167 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170done
2171case $ac_lo in #((
2172?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2173'') ac_retval=1 ;;
2174esac
2175 else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179static long int longval () { return $2; }
2180static unsigned long int ulongval () { return $2; }
2181#include <stdio.h>
2182#include <stdlib.h>
2183int
2184main ()
2185{
2186
2187 FILE *f = fopen ("conftest.val", "w");
2188 if (! f)
2189 return 1;
2190 if (($2) < 0)
2191 {
2192 long int i = longval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%ld", i);
2196 }
2197 else
2198 {
2199 unsigned long int i = ulongval ();
2200 if (i != ($2))
2201 return 1;
2202 fprintf (f, "%lu", i);
2203 }
2204 /* Do not output a trailing newline, as this causes \r\n confusion
2205 on some platforms. */
2206 return ferror (f) || fclose (f) != 0;
2207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_run "$LINENO"; then :
2213 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2214else
2215 ac_retval=1
2216fi
2217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2218 conftest.$ac_objext conftest.beam conftest.$ac_ext
2219rm -f conftest.val
2220
2221 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223 as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_compute_int
2226
2227# ac_fn_c_check_func LINENO FUNC VAR
2228# ----------------------------------
2229# Tests whether FUNC exists, setting the cache variable VAR accordingly
2230ac_fn_c_check_func ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2234$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2242#define $2 innocuous_$2
2243
2244/* System header to define __stub macros and hopefully few prototypes,
2245 which can conflict with char $2 (); below.
2246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2247 <limits.h> exists even on freestanding compilers. */
2248
2249#ifdef __STDC__
2250# include <limits.h>
2251#else
2252# include <assert.h>
2253#endif
2254
2255#undef $2
2256
2257/* Override any GCC internal prototype to avoid an error.
2258 Use char because int might match the return type of a GCC
2259 builtin and then its argument prototype would still apply. */
2260#ifdef __cplusplus
2261extern "C"
2262#endif
2263char $2 ();
2264/* The GNU C library defines this for functions which it implements
2265 to always fail with ENOSYS. Some functions are actually named
2266 something starting with __ and the normal name is an alias. */
2267#if defined __stub_$2 || defined __stub___$2
2268choke me
2269#endif
2270
2271int
2272main ()
2273{
2274return $2 ();
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_link "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext \
2285 conftest$ac_exeext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002291
2292} # ac_fn_c_check_func
2293
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002294# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2295# ---------------------------------------------
2296# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2297# accordingly.
2298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 as_decl_name=`echo $2|sed 's/ *(.*//'`
2302 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2304$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2305if eval \${$3+:} false; then :
2306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
2314#ifndef $as_decl_name
2315#ifdef __cplusplus
2316 (void) $as_decl_use;
2317#else
2318 (void) $as_decl_name;
2319#endif
2320#endif
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$3
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
2336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337
2338} # ac_fn_c_check_decl
2339
Matthias Kloseb9621712010-04-24 17:59:49 +00002340# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2341# ----------------------------------------------------
2342# Tries to find if the field MEMBER exists in type AGGR, after including
2343# INCLUDES, setting cache variable VAR accordingly.
2344ac_fn_c_check_member ()
2345{
2346 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2348$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002349if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002350 $as_echo_n "(cached) " >&6
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
2372main ()
2373{
2374static $2 ac_aggr;
2375if (sizeof ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$4=yes"
2383else
2384 eval "$4=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390eval ac_res=\$$4
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2392$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002393 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002394
2395} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
2399
Georg Brandl08a90122012-09-29 09:34:13 +02002400It was created by python $as_me 3.4, which was
Trent Nelsona4519a62012-10-16 11:51:08 -04002401generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403 $ $0 $@
2404
2405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
2412
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
2418
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2421
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2429
2430_ASUNAME
2431
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
2436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 $as_echo "PATH: $as_dir"
2438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441} >&5
2442
2443cat >&5 <<_ACEOF
2444
2445
2446## ----------- ##
2447## Core tests. ##
2448## ----------- ##
2449
2450_ACEOF
2451
2452
2453# Keep a trace of the command line.
2454# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002455# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002456# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002457# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002459ac_configure_args0=
2460ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002461ac_must_keep_next=false
2462for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002463do
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 for ac_arg
2465 do
2466 case $ac_arg in
2467 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2469 | -silent | --silent | --silen | --sile | --sil)
2470 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 esac
2474 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002479 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002481 case $ac_arg in
2482 *=* | --config-cache | -C | -disable-* | --disable-* \
2483 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2484 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2485 | -with-* | --with-* | -without-* | --without-* | --x)
2486 case "$ac_configure_args0 " in
2487 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2488 esac
2489 ;;
2490 -* ) ac_must_keep_next=true ;;
2491 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 ;;
2495 esac
2496 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
Matthias Kloseb9621712010-04-24 17:59:49 +00002498{ ac_configure_args0=; unset ac_configure_args0;}
2499{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501# When interrupted or exit'd, cleanup temporary files, and complete
2502# config.log. We remove comments because anyway the quotes in there
2503# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504# WARNING: Use '\'' to represent an apostrophe within the trap.
2505# 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 +00002506trap 'exit_status=$?
2507 # Save into config.log some information that might help in debugging.
2508 {
2509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
2515 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516(
2517 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2518 eval ac_val=\$$ac_var
2519 case $ac_val in #(
2520 *${as_nl}*)
2521 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2523$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
2525 case $ac_var in #(
2526 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2528 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac ;;
2530 esac
2531 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2534 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 "s/'\''/'\''\\\\'\'''\''/g;
2537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2538 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002539 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002541 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac |
2543 sort
2544)
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002546
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002548## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_vars
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560
2561 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002565 echo
2566 for ac_var in $ac_subst_files
2567 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 eval ac_val=\$$ac_var
2569 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 done | sort
2574 echo
2575 fi
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002579## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
2584 fi
2585 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$as_me: caught signal $ac_signal"
2587 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 rm -f core *.core core.conftest.* &&
2590 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002593for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596ac_signal=0
2597
2598# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601$as_echo "/* confdefs.h */" > confdefs.h
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Predefined preprocessor variables.
2604
2605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_NAME "$PACKAGE_NAME"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_VERSION "$PACKAGE_VERSION"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_STRING "$PACKAGE_STRING"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2623_ACEOF
2624
Matthias Kloseb9621712010-04-24 17:59:49 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_URL "$PACKAGE_URL"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629
2630# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002631# Prefer an explicitly selected file to automatically selected ones.
2632ac_site_file1=NONE
2633ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 # We do not want a PATH search for config.site.
2636 case $CONFIG_SITE in #((
2637 -*) ac_site_file1=./$CONFIG_SITE;;
2638 */*) ac_site_file1=$CONFIG_SITE;;
2639 *) ac_site_file1=./$CONFIG_SITE;;
2640 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 ac_site_file1=$prefix/share/config.site
2643 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644else
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$ac_default_prefix/share/config.site
2646 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002648for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649do
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 test "x$ac_site_file" = xNONE && continue
2651 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2653$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002655 . "$ac_site_file" \
2656 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2658as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002659See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660 fi
2661done
2662
2663if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # Some versions of bash will fail to source /dev/null (special files
2665 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2666 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2668$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2671 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674else
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2676$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 >$cache_file
2678fi
2679
2680# Check that the precious variables saved in the cache have kept the same
2681# value.
2682ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2685 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2687 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 case $ac_old_set,$ac_new_set in
2689 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2691$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 +00002692 ac_cache_corrupted=: ;;
2693 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2695$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_cache_corrupted=: ;;
2697 ,);;
2698 *)
2699 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 # differences in whitespace do not lead to failure.
2701 ac_old_val_w=`echo x $ac_old_val`
2702 ac_new_val_w=`echo x $ac_new_val`
2703 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2705$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2706 ac_cache_corrupted=:
2707 else
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2709$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2710 eval $ac_var=\$ac_old_val
2711 fi
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2713$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2715$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 fi;;
2717 esac
2718 # Pass precious variables to config.status.
2719 if test "$ac_new_set" = set; then
2720 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 *) ac_arg=$ac_var=$ac_new_val ;;
2723 esac
2724 case " $ac_configure_args " in
2725 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
2729done
2730if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2734$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002735 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002737## -------------------- ##
2738## Main body of script. ##
2739## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740
Guido van Rossum7f43da71994-08-01 12:15:30 +00002741ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746
Guido van Rossum627b2d71993-12-24 10:39:16 +00002747
Michael W. Hudson54241132001-12-07 15:38:26 +00002748
Trent Nelson4d4ec652012-10-16 08:51:24 -04002749
Trent Nelson5595ab52012-10-17 04:47:31 -04002750if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002751 # If we're building out-of-tree, we need to make sure the following
2752 # resources get picked up before their $srcdir counterparts.
2753 # Objects/ -> typeslots.inc
2754 # Include/ -> Python-ast.h, graminit.h
2755 # Python/ -> importlib.h
2756 # (A side effect of this is that these resources will automatically be
2757 # regenerated when building out-of-tree, regardless of whether or not
2758 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2759 # off.)
2760 BASECPPFLAGS="-IObjects -IInclude -IPython"
2761else
2762 BASECPPFLAGS=""
2763fi
2764
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765
2766
2767
2768
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002769if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770then
2771# Extract the first word of "hg", so it can be a program name with args.
2772set dummy hg; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002775if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776 $as_echo_n "(cached) " >&6
2777else
2778 if test -n "$HAS_HG"; then
2779 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04002787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788 ac_cv_prog_HAS_HG="found"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
2793 done
2794IFS=$as_save_IFS
2795
2796 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2797fi
2798fi
2799HAS_HG=$ac_cv_prog_HAS_HG
2800if test -n "$HAS_HG"; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2802$as_echo "$HAS_HG" >&6; }
2803else
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809else
2810HAS_HG=no-repository
2811fi
2812if test $HAS_HG = found
2813then
2814 HGVERSION="hg id -i \$(srcdir)"
2815 HGTAG="hg id -t \$(srcdir)"
2816 HGBRANCH="hg id -b \$(srcdir)"
2817else
2818 HGVERSION=""
2819 HGTAG=""
2820 HGBRANCH=""
2821fi
2822
2823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
2826
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002827ac_aux_dir=
2828for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2829 if test -f "$ac_dir/install-sh"; then
2830 ac_aux_dir=$ac_dir
2831 ac_install_sh="$ac_aux_dir/install-sh -c"
2832 break
2833 elif test -f "$ac_dir/install.sh"; then
2834 ac_aux_dir=$ac_dir
2835 ac_install_sh="$ac_aux_dir/install.sh -c"
2836 break
2837 elif test -f "$ac_dir/shtool"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/shtool install -c"
2840 break
2841 fi
2842done
2843if test -z "$ac_aux_dir"; then
2844 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2845fi
2846
2847# These three variables are undocumented and unsupported,
2848# and are intended to be withdrawn in a future Autoconf release.
2849# They can cause serious problems if a builder's source tree is in a directory
2850# whose full name contains unusual characters.
2851ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2852ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2853ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2854
2855
2856# Make sure we can run config.sub.
2857$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2858 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2861$as_echo_n "checking build system type... " >&6; }
2862if ${ac_cv_build+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 ac_build_alias=$build_alias
2866test "x$ac_build_alias" = x &&
2867 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2868test "x$ac_build_alias" = x &&
2869 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2870ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2871 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2872
2873fi
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2875$as_echo "$ac_cv_build" >&6; }
2876case $ac_cv_build in
2877*-*-*) ;;
2878*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2879esac
2880build=$ac_cv_build
2881ac_save_IFS=$IFS; IFS='-'
2882set x $ac_cv_build
2883shift
2884build_cpu=$1
2885build_vendor=$2
2886shift; shift
2887# Remember, the first character of IFS is used to create $*,
2888# except with old shells:
2889build_os=$*
2890IFS=$ac_save_IFS
2891case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2892
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2895$as_echo_n "checking host system type... " >&6; }
2896if ${ac_cv_host+:} false; then :
2897 $as_echo_n "(cached) " >&6
2898else
2899 if test "x$host_alias" = x; then
2900 ac_cv_host=$ac_cv_build
2901else
2902 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2903 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2904fi
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2908$as_echo "$ac_cv_host" >&6; }
2909case $ac_cv_host in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2912esac
2913host=$ac_cv_host
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_host
2916shift
2917host_cpu=$1
2918host_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922host_os=$*
2923IFS=$ac_save_IFS
2924case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2925
2926
2927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928if test "$cross_compiling" = yes; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2930$as_echo_n "checking for python interpreter for cross build... " >&6; }
2931 if test -z "$PYTHON_FOR_BUILD"; then
2932 for interp in python$PACKAGE_VERSION python3 python; do
2933 which $interp >/dev/null 2>&1 || continue
2934 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2935 break
2936 fi
2937 interp=
2938 done
2939 if test x$interp = x; then
2940 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2941 fi
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2943$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002944 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 +02002945 fi
2946else
2947 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
Benjamin Petersond23f8222009-04-05 19:13:16 +00002952if test "$prefix" != "/"; then
2953 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2954fi
2955
2956
Martin v. Löwis11437992002-04-12 09:54:03 +00002957
2958
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002959# We don't use PACKAGE_ variables, and they cause conflicts
2960# with other autoconf-based packages that include Python.h
2961grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2962rm confdefs.h
2963mv confdefs.h.new confdefs.h
2964
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002965
Georg Brandl08a90122012-09-29 09:34:13 +02002966VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002967
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002968# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002969
2970SOVERSION=1.0
2971
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972# The later defininition of _XOPEN_SOURCE disables certain features
2973# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976
2977
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983
2984
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990
2991
Martin v. Löwisd6320502004-08-12 13:45:08 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996
2997
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2999# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3000# them.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003
3004
3005
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003006define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003007
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003008# Arguments passed to configure.
3009
3010CONFIG_ARGS="$ac_configure_args"
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3013$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003014# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003015if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 case $enableval in
3018 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 # Locate the best usable SDK, see Mac/README.txt for more
3020 # information
3021 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3022 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3025 if test ! -d "${enableval}"
3026 then
3027 enableval=/
3028 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
3032 case $enableval in
3033 no)
3034 UNIVERSALSDK=
3035 enable_universalsdk=
3036 ;;
3037 *)
3038 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 if test ! -d "${UNIVERSALSDK}"
3040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003041 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043 ;;
3044 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047else
3048
3049 UNIVERSALSDK=
3050 enable_universalsdk=
3051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054if test -n "${UNIVERSALSDK}"
3055then
Matthias Kloseb9621712010-04-24 17:59:49 +00003056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3057$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058else
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3060$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003064
3065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
3073 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3088$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 UNIVERSAL_ARCHS="$withval"
3090
3091else
3092
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095
3096fi
3097
3098
3099
3100
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003101
3102# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003103if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104 withval=$with_framework_name;
3105 PYTHONFRAMEWORK=${withval}
3106 PYTHONFRAMEWORKDIR=${withval}.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3108
3109else
3110
3111 PYTHONFRAMEWORK=Python
3112 PYTHONFRAMEWORKDIR=Python.framework
3113 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3114
3115fi
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003118if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003120 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003122 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003123 esac
3124 case $enableval in
3125 no)
3126 PYTHONFRAMEWORK=
3127 PYTHONFRAMEWORKDIR=no-framework
3128 PYTHONFRAMEWORKPREFIX=
3129 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130 FRAMEWORKINSTALLFIRST=
3131 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003132 FRAMEWORKALTINSTALLFIRST=
3133 FRAMEWORKALTINSTALLLAST=
3134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 if test "x${prefix}" = "xNONE" ; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 else
3154 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3155 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
3157 case "${enableval}" in
3158 /System*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 if test "${prefix}" = "NONE" ; then
3161 # See below
3162 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3163 fi
3164 ;;
3165
3166 /Library*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 ;;
3169
3170 */Library/Frameworks)
3171 MDIR="`dirname "${enableval}"`"
3172 MDIR="`dirname "${MDIR}"`"
3173 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3174
3175 if test "${prefix}" = "NONE"; then
3176 # User hasn't specified the
3177 # --prefix option, but wants to install
3178 # the framework in a non-default location,
3179 # ensure that the compatibility links get
3180 # installed relative to that prefix as well
3181 # instead of in /usr/local.
3182 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3183 fi
3184 ;;
3185
3186 *)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 ;;
3189 esac
3190
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3200
3201 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3202
Jack Jansene578a632001-08-15 01:27:14 +00003203 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Guido van Rossum563e7081996-09-10 18:20:48 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansene578a632001-08-15 01:27:14 +00003207 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003208 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORKPREFIX=
3210 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003211 FRAMEWORKINSTALLFIRST=
3212 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 FRAMEWORKALTINSTALLFIRST=
3214 FRAMEWORKALTINSTALLLAST=
3215 if test "x${prefix}" = "xNONE" ; then
3216 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3217 else
3218 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3219 fi
Jack Jansene578a632001-08-15 01:27:14 +00003220 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223fi
3224
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
3226
Michael W. Hudson54241132001-12-07 15:38:26 +00003227
3228
3229
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003232
3233
3234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003236
Jack Jansene578a632001-08-15 01:27:14 +00003237##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003238## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003239## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003240##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241# Set name for machine-dependent library files
3242
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3244$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003245if test -z "$MACHDEP"
3246then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 # avoid using uname for cross builds
3248 if test "$cross_compiling" = yes; then
3249 # ac_sys_system and ac_sys_release are only used for setting
3250 # `define_xopen_source' in the case statement below. For the
3251 # current supported cross builds, this macro is not adjusted.
3252 case "$host" in
3253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Guido van Rossum91922671997-10-09 20:24:13 +00003418#
3419# SGI compilers allow the specification of the both the ABI and the
3420# ISA on the command line. Depending on the values of these switches,
3421# different and often incompatable code will be generated.
3422#
3423# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3424# thus supply support for various ABI/ISA combinations. The MACHDEP
3425# variable is also adjusted.
3426#
3427
3428if test ! -z "$SGI_ABI"
3429then
3430 CC="cc $SGI_ABI"
3431 LDFLAGS="$SGI_ABI $LDFLAGS"
3432 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3435$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436
Jack Jansen6b08a402004-06-03 12:41:45 +00003437# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3438# it may influence the way we can build extensions, so distutils
3439# needs to check it
3440
Thomas Wouters477c8d52006-05-27 19:21:47 +00003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003444
Guido van Rossum627b2d71993-12-24 10:39:16 +00003445# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003446
3447# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3448# for debug/optimization stuff. BASECFLAGS is for flags that are required
3449# just to get things to compile and link. Users are free to override OPT
3450# when running configure or make. The build should not break if they do.
3451# BASECFLAGS should generally not be messed with, however.
3452
3453# XXX shouldn't some/most/all of this code be merged with the stuff later
3454# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3456$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003459if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003461 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003462 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463 without_gcc=yes;;
3464 yes) CC=gcc
3465 without_gcc=no;;
3466 *) CC=$withval
3467 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003471 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003472 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003473 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003474 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003475 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476fi
3477
Matthias Kloseb9621712010-04-24 17:59:49 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3479$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Guido van Rossum8b131c51995-03-09 14:10:13 +00003481# If the user switches compilers, we can't believe the cache
3482if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3483then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003484 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003485(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003486fi
3487
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003488# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3489# when the compiler supports them, but we don't always want -O2, and
3490# we set -g later.
3491if test -z "$CFLAGS"; then
3492 CFLAGS=
3493fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494
3495if test "$ac_sys_system" = "Darwin"
3496then
3497 # Compiler selection on MacOSX is more complicated than
3498 # AC_PROG_CC can handle, see Mac/README.txt for more
3499 # information
3500 if test -z "${CC}"
3501 then
3502 found_gcc=
3503 found_clang=
3504 as_save_IFS=$IFS; IFS=:
3505 for as_dir in $PATH
3506 do
3507 IFS=$as_save_IFS
3508 if test -x $as_dir/gcc; then
3509 if test -z "${found_gcc}"; then
3510 found_gcc=$as_dir/gcc
3511 fi
3512 fi
3513 if test -x $as_dir/clang; then
3514 if test -z "${found_clang}"; then
3515 found_clang=$as_dir/clang
3516 fi
3517 fi
3518 done
3519 IFS=$as_save_IFS
3520
3521 if test -n "$found_gcc" -a -n "$found_clang"
3522 then
3523 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3524 then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3526$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3527 CC="$found_clang"
3528 CXX="$found_clang++"
3529 fi
3530
3531
3532 elif test -z "$found_gcc" -a -n "$found_clang"
3533 then
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3535$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3536 CC="$found_clang"
3537 CXX="$found_clang++"
3538
3539 elif test -z "$found_gcc" -a -z "$found_clang"
3540 then
3541 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3542 if test -n "${found_clang}"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3545$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3546 CC="${found_clang}"
3547 CXX="`/usr/bin/xcrun -find clang++`"
3548
3549 # else: use default behaviour
3550 fi
3551 fi
3552 fi
3553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554ac_ext=c
3555ac_cpp='$CPP $CPPFLAGS'
3556ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558ac_compiler_gnu=$ac_cv_c_compiler_gnu
3559if test -n "$ac_tool_prefix"; then
3560 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3561set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003564if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003566else
3567 if test -n "$CC"; then
3568 ac_cv_prog_CC="$CC" # Let the user override the test.
3569else
Martin v. Löwis11437992002-04-12 09:54:03 +00003570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $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 +00003579 break 2
3580 fi
3581done
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
Jack Jansendd19cf82001-12-06 22:36:17 +00003585fi
3586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003587CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003588if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3590$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003591else
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597fi
3598if test -z "$ac_cv_prog_CC"; then
3599 ac_ct_CC=$CC
3600 # Extract the first word of "gcc", so it can be a program name with args.
3601set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3603$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003604if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
3607 if test -n "$ac_ct_CC"; then
3608 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3609else
3610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3611for as_dir in $PATH
3612do
3613 IFS=$as_save_IFS
3614 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $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 +00003619 break 2
3620 fi
3621done
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003624
3625fi
3626fi
3627ac_ct_CC=$ac_cv_prog_ac_ct_CC
3628if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3630$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634fi
3635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636 if test "x$ac_ct_CC" = x; then
3637 CC=""
3638 else
3639 case $cross_compiling:$ac_tool_warned in
3640yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643ac_tool_warned=yes ;;
3644esac
3645 CC=$ac_ct_CC
3646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003649fi
3650
Jack Jansendd19cf82001-12-06 22:36:17 +00003651if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 if test -n "$ac_tool_prefix"; then
3653 # 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 +00003654set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003657if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003659else
3660 if test -n "$CC"; then
3661 ac_cv_prog_CC="$CC" # Let the user override the test.
3662else
Martin v. Löwis11437992002-04-12 09:54:03 +00003663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 $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 +00003672 break 2
3673 fi
3674done
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003677
3678fi
3679fi
3680CC=$ac_cv_prog_CC
3681if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3683$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003691fi
3692if test -z "$CC"; then
3693 # Extract the first word of "cc", so it can be a program name with args.
3694set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003697if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
3700 if test -n "$CC"; then
3701 ac_cv_prog_CC="$CC" # Let the user override the test.
3702else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3712 ac_prog_rejected=yes
3713 continue
3714 fi
3715 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $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 +00003717 break 2
3718 fi
3719done
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723if test $ac_prog_rejected = yes; then
3724 # We found a bogon in the path, so make sure we never use it.
3725 set dummy $ac_cv_prog_CC
3726 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003728 # We chose a different compiler from the bogus one.
3729 # However, it has the same basename, so the bogon will be chosen
3730 # first if we set CC to just the basename; use the full file name.
3731 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003732 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 fi
3734fi
3735fi
3736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3740$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744fi
3745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 do
3752 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3753set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003756if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003758else
3759 if test -n "$CC"; then
3760 ac_cv_prog_CC="$CC" # Let the user override the test.
3761else
Martin v. Löwis11437992002-04-12 09:54:03 +00003762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH
3764do
3765 IFS=$as_save_IFS
3766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $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 +00003771 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773done
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003776
3777fi
3778fi
3779CC=$ac_cv_prog_CC
3780if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3782$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003783else
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003786fi
3787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 test -n "$CC" && break
3790 done
3791fi
3792if test -z "$CC"; then
3793 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003795do
3796 # Extract the first word of "$ac_prog", so it can be a program name with args.
3797set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003800if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
3803 if test -n "$ac_ct_CC"; then
3804 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3805else
3806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809 IFS=$as_save_IFS
3810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04003812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $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 +00003815 break 2
3816 fi
3817done
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822fi
3823ac_ct_CC=$ac_cv_prog_ac_ct_CC
3824if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3826$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827else
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 test -n "$ac_ct_CC" && break
3834done
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 if test "x$ac_ct_CC" = x; then
3837 CC=""
3838 else
3839 case $cross_compiling:$ac_tool_warned in
3840yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843ac_tool_warned=yes ;;
3844esac
3845 CC=$ac_ct_CC
3846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
3848
3849fi
3850
3851
Matthias Kloseb9621712010-04-24 17:59:49 +00003852test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003854as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003858$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3859set X $ac_compile
3860ac_compiler=$2
3861for ac_option in --version -v -V -qversion; do
3862 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863case "(($ac_try" in
3864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3865 *) ac_try_echo=$ac_try;;
3866esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3868$as_echo "$ac_try_echo"; } >&5
3869 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 if test -s conftest.err; then
3872 sed '10a\
3873... rest of stderr output deleted ...
3874 10q' conftest.err >conftest.er1
3875 cat conftest.er1 >&5
3876 fi
3877 rm -f conftest.er1 conftest.err
3878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3879 test $ac_status = 0; }
3880done
Martin v. Löwis11437992002-04-12 09:54:03 +00003881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003883/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885int
3886main ()
3887{
3888
3889 ;
3890 return 0;
3891}
3892_ACEOF
3893ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003894ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003895# Try to create an executable without -o first, disregard a.out.
3896# It will help us diagnose broken compilers, and finding out an intuition
3897# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3899$as_echo_n "checking whether the C compiler works... " >&6; }
3900ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3901
3902# The possible output files:
3903ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905ac_rmfiles=
3906for ac_file in $ac_files
3907do
3908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3911 esac
3912done
3913rm -f $ac_rmfiles
3914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916case "(($ac_try" in
3917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3918 *) ac_try_echo=$ac_try;;
3919esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3921$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3925 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3927# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3928# in a Makefile. We should not override ac_cv_exeext if it was cached,
3929# so that the user can short-circuit this test for compilers unknown to
3930# Autoconf.
3931for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003932do
3933 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936 ;;
3937 [ab].out )
3938 # We found the default executable, but exeext='' is most
3939 # certainly right.
3940 break;;
3941 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 then :; else
3944 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3945 fi
3946 # We set ac_cv_exeext here because the later test for it is not
3947 # safe: cross compilers may not add the suffix if given an `-o'
3948 # argument, so we may need to know it at that point already.
3949 # Even if this section looks crufty: it has the advantage of
3950 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003951 break;;
3952 * )
3953 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 esac
3955done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956test "$ac_cv_exeext" = no && ac_cv_exeext=
3957
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003958else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 ac_file=''
3960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if test -z "$ac_file"; then :
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3963$as_echo "no" >&6; }
3964$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003971else
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3973$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3976$as_echo_n "checking for C compiler default output file name... " >&6; }
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3978$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3984$as_echo_n "checking for suffix of executables... " >&6; }
3985if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986case "(($ac_try" in
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3989esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3997# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3998# work properly (i.e., refer to `conftest.exe'), while it won't with
3999# `rm'.
4000for ac_file in conftest.exe conftest conftest.*; do
4001 test -f "$ac_file" || continue
4002 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004003 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4005 break;;
4006 * ) break;;
4007 esac
4008done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004009else
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004012as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004013See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004015rm -f conftest conftest$ac_cv_exeext
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4017$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
4019rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004020EXEEXT=$ac_cv_exeext
4021ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4023/* end confdefs.h. */
4024#include <stdio.h>
4025int
4026main ()
4027{
4028FILE *f = fopen ("conftest.out", "w");
4029 return ferror (f) || fclose (f) != 0;
4030
4031 ;
4032 return 0;
4033}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004035ac_clean_files="$ac_clean_files conftest.out"
4036# Check that the compiler produces executables we can run. If not, either
4037# the compiler is broken, or we cross compile.
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4039$as_echo_n "checking whether we are cross compiling... " >&6; }
4040if test "$cross_compiling" != yes; then
4041 { { ac_try="$ac_link"
4042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
4046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
4048 (eval "$ac_link") 2>&5
4049 ac_status=$?
4050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }
4052 if { ac_try='./conftest$ac_cv_exeext'
4053 { { case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
4057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4058$as_echo "$ac_try_echo"; } >&5
4059 (eval "$ac_try") 2>&5
4060 ac_status=$?
4061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062 test $ac_status = 0; }; }; then
4063 cross_compiling=no
4064 else
4065 if test "$cross_compiling" = maybe; then
4066 cross_compiling=yes
4067 else
4068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004070as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004071If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004072See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 fi
4074 fi
4075fi
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4077$as_echo "$cross_compiling" >&6; }
4078
4079rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4080ac_clean_files=$ac_clean_files_save
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4082$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004083if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo_n "(cached) " >&6
4085else
4086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004087/* end confdefs.h. */
4088
4089int
4090main ()
4091{
4092
4093 ;
4094 return 0;
4095}
4096_ACEOF
4097rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004098if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004099case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 for ac_file in conftest.o conftest.obj conftest.*; do
4110 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4114 break;;
4115 esac
4116done
4117else
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119sed 's/^/| /' conftest.$ac_ext >&5
4120
Matthias Kloseb9621712010-04-24 17:59:49 +00004121{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004124See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004125fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004126rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4129$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004130OBJEXT=$ac_cv_objext
4131ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4133$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004134if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004139
Martin v. Löwis11437992002-04-12 09:54:03 +00004140int
4141main ()
4142{
4143#ifndef __GNUC__
4144 choke me
4145#endif
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_compiler_gnu=yes
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004157ac_cv_c_compiler_gnu=$ac_compiler_gnu
4158
4159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4161$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4162if test $ac_compiler_gnu = yes; then
4163 GCC=yes
4164else
4165 GCC=
4166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004167ac_test_CFLAGS=${CFLAGS+set}
4168ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4170$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004171if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004173else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 ac_save_c_werror_flag=$ac_c_werror_flag
4175 ac_c_werror_flag=yes
4176 ac_cv_prog_cc_g=no
4177 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004190 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 CFLAGS=""
4193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194/* end confdefs.h. */
4195
4196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Matthias Kloseb9621712010-04-24 17:59:49 +00004206else
4207 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228 ac_c_werror_flag=$ac_save_c_werror_flag
4229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4231$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004232if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234elif test $ac_cv_prog_cc_g = yes; then
4235 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 CFLAGS="-g -O2"
4237 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004238 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239 fi
4240else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241 if test "$GCC" = yes; then
4242 CFLAGS="-O2"
4243 else
4244 CFLAGS=
4245 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4248$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004251else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004253ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
4256#include <stdarg.h>
4257#include <stdio.h>
Trent Nelsona4519a62012-10-16 11:51:08 -04004258struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004259/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4260struct buf { int x; };
4261FILE * (*rcsopen) (struct buf *, struct stat *, int);
4262static char *e (p, i)
4263 char **p;
4264 int i;
4265{
4266 return p[i];
4267}
4268static char *f (char * (*g) (char **, int), char **p, ...)
4269{
4270 char *s;
4271 va_list v;
4272 va_start (v,p);
4273 s = g (p, va_arg (v,int));
4274 va_end (v);
4275 return s;
4276}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277
4278/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4279 function prototypes and stuff, but not '\xHH' hex character constants.
4280 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4283 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4288 inside strings and character constants. */
4289#define FOO(x) 'x'
4290int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4291
Skip Montanaro6dead952003-09-25 14:50:04 +00004292int test (int i, double x);
4293struct s1 {int (*f) (int a);};
4294struct s2 {int (*f) (double a);};
4295int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4296int argc;
4297char **argv;
4298int
4299main ()
4300{
4301return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4302 ;
4303 return 0;
4304}
4305_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4307 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004308do
4309 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313rm -f core conftest.err conftest.$ac_objext
4314 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004315done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004317CC=$ac_save_CC
4318
4319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320# AC_CACHE_VAL
4321case "x$ac_cv_prog_cc_c89" in
4322 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4324$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4327$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004328 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4331$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004332esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004333if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004334
Matthias Kloseb9621712010-04-24 17:59:49 +00004335fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Martin v. Löwis11437992002-04-12 09:54:03 +00004337ac_ext=c
4338ac_cpp='$CPP $CPPFLAGS'
4339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4341ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004343
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004344
4345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4347$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353 case $withval in
4354 no) with_cxx_main=no
4355 MAINCC='$(CC)';;
4356 yes) with_cxx_main=yes
4357 MAINCC='$(CXX)';;
4358 *) with_cxx_main=yes
4359 MAINCC=$withval
4360 if test -z "$CXX"
4361 then
4362 CXX=$withval
4363 fi;;
4364 esac
4365else
4366
4367 with_cxx_main=no
4368 MAINCC='$(CC)'
4369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370fi
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4373$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004374
4375preset_cxx="$CXX"
4376if test -z "$CXX"
4377then
4378 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004379 gcc) if test -n "$ac_tool_prefix"; then
4380 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4381set dummy ${ac_tool_prefix}g++; ac_word=$2
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383$as_echo_n "checking for $ac_word... " >&6; }
4384if ${ac_cv_path_CXX+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 case $CXX in
4388 [\\/]* | ?:[\\/]*)
4389 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4390 ;;
4391 *)
4392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4393for as_dir in notfound
4394do
4395 IFS=$as_save_IFS
4396 test -z "$as_dir" && as_dir=.
4397 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004399 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4401 break 2
4402 fi
4403done
4404 done
4405IFS=$as_save_IFS
4406
4407 ;;
4408esac
4409fi
4410CXX=$ac_cv_path_CXX
4411if test -n "$CXX"; then
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4413$as_echo "$CXX" >&6; }
4414else
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416$as_echo "no" >&6; }
4417fi
4418
4419
4420fi
4421if test -z "$ac_cv_path_CXX"; then
4422 ac_pt_CXX=$CXX
4423 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004424set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4426$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004427if ${ac_cv_path_ac_pt_CXX+:} false; then :
4428 $as_echo_n "(cached) " >&6
4429else
4430 case $ac_pt_CXX in
4431 [\\/]* | ?:[\\/]*)
4432 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4433 ;;
4434 *)
4435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4436for as_dir in notfound
4437do
4438 IFS=$as_save_IFS
4439 test -z "$as_dir" && as_dir=.
4440 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004442 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4444 break 2
4445 fi
4446done
4447 done
4448IFS=$as_save_IFS
4449
4450 ;;
4451esac
4452fi
4453ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4454if test -n "$ac_pt_CXX"; then
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4456$as_echo "$ac_pt_CXX" >&6; }
4457else
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459$as_echo "no" >&6; }
4460fi
4461
4462 if test "x$ac_pt_CXX" = x; then
4463 CXX="g++"
4464 else
4465 case $cross_compiling:$ac_tool_warned in
4466yes:)
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4469ac_tool_warned=yes ;;
4470esac
4471 CXX=$ac_pt_CXX
4472 fi
4473else
4474 CXX="$ac_cv_path_CXX"
4475fi
4476 ;;
4477 cc) if test -n "$ac_tool_prefix"; then
4478 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4479set dummy ${ac_tool_prefix}c++; ac_word=$2
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4481$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004482if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004484else
4485 case $CXX in
4486 [\\/]* | ?:[\\/]*)
4487 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4488 ;;
4489 *)
4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in notfound
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004499 break 2
4500 fi
4501done
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004503IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505 ;;
4506esac
4507fi
4508CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004509if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4511$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004512else
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004516
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004517
4518fi
4519if test -z "$ac_cv_path_CXX"; then
4520 ac_pt_CXX=$CXX
4521 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4524$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004525if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004526 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004527else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004528 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004530 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 +00004531 ;;
4532 *)
4533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4534for as_dir in notfound
4535do
4536 IFS=$as_save_IFS
4537 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004538 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004540 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004542 break 2
4543 fi
4544done
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004546IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 ;;
4549esac
4550fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004551ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4552if test -n "$ac_pt_CXX"; then
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4554$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004555else
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004559
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004560 if test "x$ac_pt_CXX" = x; then
4561 CXX="c++"
4562 else
4563 case $cross_compiling:$ac_tool_warned in
4564yes:)
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4566$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4567ac_tool_warned=yes ;;
4568esac
4569 CXX=$ac_pt_CXX
4570 fi
4571else
4572 CXX="$ac_cv_path_CXX"
4573fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004574 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004575 clang|*/clang) if test -n "$ac_tool_prefix"; then
4576 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4577set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4579$as_echo_n "checking for $ac_word... " >&6; }
4580if ${ac_cv_path_CXX+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582else
4583 case $CXX in
4584 [\\/]* | ?:[\\/]*)
4585 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4586 ;;
4587 *)
4588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4589for as_dir in notfound
4590do
4591 IFS=$as_save_IFS
4592 test -z "$as_dir" && as_dir=.
4593 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004595 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4597 break 2
4598 fi
4599done
4600 done
4601IFS=$as_save_IFS
4602
Ned Deilycbfb9a52012-06-23 16:02:19 -07004603 ;;
4604esac
4605fi
4606CXX=$ac_cv_path_CXX
4607if test -n "$CXX"; then
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4609$as_echo "$CXX" >&6; }
4610else
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4612$as_echo "no" >&6; }
4613fi
4614
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615
4616fi
4617if test -z "$ac_cv_path_CXX"; then
4618 ac_pt_CXX=$CXX
4619 # Extract the first word of "clang++", so it can be a program name with args.
4620set dummy clang++; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_ac_pt_CXX+:} false; then :
4624 $as_echo_n "(cached) " >&6
4625else
4626 case $ac_pt_CXX in
4627 [\\/]* | ?:[\\/]*)
4628 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4629 ;;
4630 *)
4631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in notfound
4633do
4634 IFS=$as_save_IFS
4635 test -z "$as_dir" && as_dir=.
4636 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004638 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640 break 2
4641 fi
4642done
4643 done
4644IFS=$as_save_IFS
4645
4646 ;;
4647esac
4648fi
4649ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4650if test -n "$ac_pt_CXX"; then
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4652$as_echo "$ac_pt_CXX" >&6; }
4653else
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658 if test "x$ac_pt_CXX" = x; then
4659 CXX="clang++"
4660 else
4661 case $cross_compiling:$ac_tool_warned in
4662yes:)
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4665ac_tool_warned=yes ;;
4666esac
4667 CXX=$ac_pt_CXX
4668 fi
4669else
4670 CXX="$ac_cv_path_CXX"
4671fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004672 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673 esac
4674 if test "$CXX" = "notfound"
4675 then
4676 CXX=""
4677 fi
4678fi
4679if test -z "$CXX"
4680then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681 if test -n "$ac_tool_prefix"; then
4682 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4683 do
4684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004688if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004689 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690else
4691 if test -n "$CXX"; then
4692 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4693else
4694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in $PATH
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004699 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004703 break 2
4704 fi
4705done
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004707IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708
4709fi
4710fi
4711CXX=$ac_cv_prog_CXX
4712if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715else
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718fi
4719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004720
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004721 test -n "$CXX" && break
4722 done
4723fi
4724if test -z "$CXX"; then
4725 ac_ct_CXX=$CXX
4726 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4727do
4728 # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 if test -n "$ac_ct_CXX"; then
4736 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4737else
4738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04004744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 ac_cv_prog_ac_ct_CXX="$ac_prog"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4748 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 done
4751IFS=$as_save_IFS
4752
4753fi
4754fi
4755ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4756if test -n "$ac_ct_CXX"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4758$as_echo "$ac_ct_CXX" >&6; }
4759else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764
4765 test -n "$ac_ct_CXX" && break
4766done
4767
4768 if test "x$ac_ct_CXX" = x; then
4769 CXX="notfound"
4770 else
4771 case $cross_compiling:$ac_tool_warned in
4772yes:)
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4775ac_tool_warned=yes ;;
4776esac
4777 CXX=$ac_ct_CXX
4778 fi
4779fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780
4781 if test "$CXX" = "notfound"
4782 then
4783 CXX=""
4784 fi
4785fi
4786if test "$preset_cxx" != "$CXX"
4787then
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789
4790 By default, distutils will build C++ extension modules with \"$CXX\".
4791 If this is not intended, then set CXX on the configure command line.
4792 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004793$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794
4795 By default, distutils will build C++ extension modules with \"$CXX\".
4796 If this is not intended, then set CXX on the configure command line.
4797 " >&2;}
4798fi
4799
4800
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4802$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4803save_LDFLAGS="$LDFLAGS"
4804LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004805
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807/* end confdefs.h. */
4808
4809int
4810main ()
4811{
4812
4813 ;
4814 return 0;
4815}
4816_ACEOF
4817if ac_fn_c_try_link "$LINENO"; then :
4818 NO_AS_NEEDED="-Wl,--no-as-needed"
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4820$as_echo "yes" >&6; }
4821else
4822 NO_AS_NEEDED=""
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826rm -f core conftest.err conftest.$ac_objext \
4827 conftest$ac_exeext conftest.$ac_ext
4828LDFLAGS="$save_LDFLAGS"
4829
4830
4831
4832# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004833ac_ext=c
4834ac_cpp='$CPP $CPPFLAGS'
4835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4837ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4839$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004840# On Suns, sometimes $CPP names a directory.
4841if test -n "$CPP" && test -d "$CPP"; then
4842 CPP=
4843fi
4844if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004845 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004847else
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 # Double quotes because CPP needs to be expanded
4849 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4850 do
4851 ac_preproc_ok=false
4852for ac_c_preproc_warn_flag in '' yes
4853do
4854 # Use a header file that comes with gcc, so configuring glibc
4855 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4857 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004858 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004861/* end confdefs.h. */
4862#ifdef __STDC__
4863# include <limits.h>
4864#else
4865# include <assert.h>
4866#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004867 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004869if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004870
Matthias Kloseb9621712010-04-24 17:59:49 +00004871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 # Broken: fails on valid input.
4873continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004874fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004875rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004881#include <ac_nonexistent.h>
4882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004883if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 # Broken: success on invalid input.
4885continue
4886else
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # Passes both tests.
4888ac_preproc_ok=:
4889break
4890fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004891rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004892
4893done
4894# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004895rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004896if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 break
4898fi
4899
4900 done
4901 ac_cv_prog_CPP=$CPP
4902
4903fi
4904 CPP=$ac_cv_prog_CPP
4905else
4906 ac_cv_prog_CPP=$CPP
4907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4909$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004910ac_preproc_ok=false
4911for ac_c_preproc_warn_flag in '' yes
4912do
4913 # Use a header file that comes with gcc, so configuring glibc
4914 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004915 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4916 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 # On the NeXT, cc -E runs the code through the compiler's parser,
4918 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004920/* end confdefs.h. */
4921#ifdef __STDC__
4922# include <limits.h>
4923#else
4924# include <assert.h>
4925#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004926 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004928if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004929
Matthias Kloseb9621712010-04-24 17:59:49 +00004930else
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # Broken: fails on valid input.
4932continue
4933fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004934rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004940#include <ac_nonexistent.h>
4941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 # Broken: success on invalid input.
4944continue
4945else
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Passes both tests.
4947ac_preproc_ok=:
4948break
4949fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004950rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952done
4953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004955if $ac_preproc_ok; then :
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957else
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004960as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004961See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004962fi
4963
4964ac_ext=c
4965ac_cpp='$CPP $CPPFLAGS'
4966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4968ac_compiler_gnu=$ac_cv_c_compiler_gnu
4969
4970
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4972$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004973if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004977 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 # Loop through the user's path and test for each of PROGNAME-LIST
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 for ac_prog in grep ggrep; do
4985 for ac_exec_ext in '' $ac_executable_extensions; do
4986 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Trent Nelsona4519a62012-10-16 11:51:08 -04004987 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004988# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 # Check for GNU $ac_path_GREP
4990case `"$ac_path_GREP" --version 2>&1` in
4991*GNU*)
4992 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4993*)
4994 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996 while :
4997 do
4998 cat "conftest.in" "conftest.in" >"conftest.tmp"
4999 mv "conftest.tmp" "conftest.in"
5000 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005002 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5003 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5006 # Best one so far, save it but keep looking for a better one
5007 ac_cv_path_GREP="$ac_path_GREP"
5008 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005009 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 # 10*(2^10) chars as input seems more than enough
5011 test $ac_count -gt 10 && break
5012 done
5013 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5014esac
5015
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $ac_path_GREP_found && break 3
5017 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005022 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 +00005023 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005024else
5025 ac_cv_path_GREP=$GREP
5026fi
5027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5030$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031 GREP="$ac_cv_path_GREP"
5032
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5035$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038else
5039 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5040 then ac_cv_path_EGREP="$GREP -E"
5041 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 # Loop through the user's path and test for each of PROGNAME-LIST
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5047do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 for ac_prog in egrep; do
5051 for ac_exec_ext in '' $ac_executable_extensions; do
5052 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Trent Nelsona4519a62012-10-16 11:51:08 -04005053 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005054# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 # Check for GNU $ac_path_EGREP
5056case `"$ac_path_EGREP" --version 2>&1` in
5057*GNU*)
5058 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5059*)
5060 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 while :
5063 do
5064 cat "conftest.in" "conftest.in" >"conftest.tmp"
5065 mv "conftest.tmp" "conftest.in"
5066 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5069 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5072 # Best one so far, save it but keep looking for a better one
5073 ac_cv_path_EGREP="$ac_path_EGREP"
5074 ac_path_EGREP_max=$ac_count
5075 fi
5076 # 10*(2^10) chars as input seems more than enough
5077 test $ac_count -gt 10 && break
5078 done
5079 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5080esac
5081
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $ac_path_EGREP_found && break 3
5083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005088 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 +00005089 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090else
5091 ac_cv_path_EGREP=$EGREP
5092fi
5093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 fi
5095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5097$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005099
5100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5102$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005103if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
5105else
5106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005107/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005108#include <stdlib.h>
5109#include <stdarg.h>
5110#include <string.h>
5111#include <float.h>
5112
5113int
5114main ()
5115{
5116
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121if ac_fn_c_try_compile "$LINENO"; then :
5122 ac_cv_header_stdc=yes
5123else
5124 ac_cv_header_stdc=no
5125fi
5126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5127
5128if test $ac_cv_header_stdc = yes; then
5129 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5131/* end confdefs.h. */
5132#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005133
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005134_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005141rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142
Matthias Kloseb9621712010-04-24 17:59:49 +00005143fi
5144
5145if test $ac_cv_header_stdc = yes; then
5146 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5148/* end confdefs.h. */
5149#include <stdlib.h>
5150
5151_ACEOF
5152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5153 $EGREP "free" >/dev/null 2>&1; then :
5154
5155else
5156 ac_cv_header_stdc=no
5157fi
5158rm -f conftest*
5159
5160fi
5161
5162if test $ac_cv_header_stdc = yes; then
5163 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5164 if test "$cross_compiling" = yes; then :
5165 :
5166else
5167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5168/* end confdefs.h. */
5169#include <ctype.h>
5170#include <stdlib.h>
5171#if ((' ' & 0x0FF) == 0x020)
5172# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5173# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5174#else
5175# define ISLOWER(c) \
5176 (('a' <= (c) && (c) <= 'i') \
5177 || ('j' <= (c) && (c) <= 'r') \
5178 || ('s' <= (c) && (c) <= 'z'))
5179# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5180#endif
5181
5182#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5183int
5184main ()
5185{
5186 int i;
5187 for (i = 0; i < 256; i++)
5188 if (XOR (islower (i), ISLOWER (i))
5189 || toupper (i) != TOUPPER (i))
5190 return 2;
5191 return 0;
5192}
5193_ACEOF
5194if ac_fn_c_try_run "$LINENO"; then :
5195
5196else
5197 ac_cv_header_stdc=no
5198fi
5199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5200 conftest.$ac_objext conftest.beam conftest.$ac_ext
5201fi
5202
5203fi
5204fi
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5206$as_echo "$ac_cv_header_stdc" >&6; }
5207if test $ac_cv_header_stdc = yes; then
5208
5209$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5210
5211fi
5212
5213# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5214for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5215 inttypes.h stdint.h unistd.h
5216do :
5217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5218ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5219"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005220if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005221 cat >>confdefs.h <<_ACEOF
5222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5223_ACEOF
5224
5225fi
5226
5227done
5228
5229
5230
5231 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 +02005232if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005233 MINIX=yes
5234else
5235 MINIX=
5236fi
5237
5238
5239 if test "$MINIX" = yes; then
5240
5241$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5242
5243
5244$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5245
5246
5247$as_echo "#define _MINIX 1" >>confdefs.h
5248
5249 fi
5250
5251
5252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5253$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005254if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005255 $as_echo_n "(cached) " >&6
5256else
5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258/* end confdefs.h. */
5259
Trent Nelsona4519a62012-10-16 11:51:08 -04005260# define __EXTENSIONS__ 1
5261 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005262int
5263main ()
5264{
5265
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270if ac_fn_c_try_compile "$LINENO"; then :
5271 ac_cv_safe_to_define___extensions__=yes
5272else
5273 ac_cv_safe_to_define___extensions__=no
5274fi
5275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5276fi
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5278$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5279 test $ac_cv_safe_to_define___extensions__ = yes &&
5280 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5281
5282 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5283
5284 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5285
5286 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5287
5288 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5289
5290
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292# Check for unsupported systems
5293case $ac_sys_system/$ac_sys_release in
5294atheos*|Linux*/1*)
5295 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5296 echo See README for details.
5297 exit 1;;
5298esac
5299
5300
Matthias Kloseb9621712010-04-24 17:59:49 +00005301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5302$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303
5304# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005305if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 withval=$with_suffix;
5307 case $withval in
5308 no) EXEEXT=;;
5309 yes) EXEEXT=.exe;;
5310 *) EXEEXT=$withval;;
5311 esac
5312fi
5313
Matthias Kloseb9621712010-04-24 17:59:49 +00005314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5315$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316
5317# Test whether we're running on a non-case-sensitive system, in which
5318# case we give a warning if no ext is given
5319
Matthias Kloseb9621712010-04-24 17:59:49 +00005320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5321$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322if test ! -d CaseSensitiveTestDir; then
5323mkdir CaseSensitiveTestDir
5324fi
5325
5326if test -d casesensitivetestdir
5327then
Matthias Kloseb9621712010-04-24 17:59:49 +00005328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5329$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330 BUILDEXEEXT=.exe
5331else
Matthias Kloseb9621712010-04-24 17:59:49 +00005332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334 BUILDEXEEXT=$EXEEXT
5335fi
5336rmdir CaseSensitiveTestDir
5337
5338case $MACHDEP in
5339bsdos*)
5340 case $CC in
5341 gcc) CC="$CC -D_HAVE_BSDI";;
5342 esac;;
5343esac
5344
5345case $ac_sys_system in
5346hp*|HP*)
5347 case $CC in
5348 cc|*/cc) CC="$CC -Ae";;
5349 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350esac
5351
5352
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5355$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356if test -z "$LIBRARY"
5357then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005358 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5361$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# LDLIBRARY is the name of the library to link against (as opposed to the
5364# name of the library into which to insert object files). BLDLIBRARY is also
5365# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5366# is blank as the main program is not linked directly against LDLIBRARY.
5367# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5368# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5369# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5370# DLLLIBRARY is the shared (i.e., DLL) library.
5371#
5372# RUNSHARED is used to run shared python without installed libraries
5373#
5374# INSTSONAME is the name of the shared library that will be use to install
5375# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005376#
5377# LDVERSION is the shared library version number, normally the Python version
5378# with the ABI build flags appended.
5379
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381
5382
5383
5384
5385
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005386
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387LDLIBRARY="$LIBRARY"
5388BLDLIBRARY='$(LDLIBRARY)'
5389INSTSONAME='$(LDLIBRARY)'
5390DLLLIBRARY=''
5391LDLIBRARYDIR=''
5392RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005393LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
5395# LINKCC is the command that links the python executable -- default is $(CC).
5396# If CXX is set, and if it is needed to link a main function that was
5397# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5398# python might then depend on the C++ runtime
5399# This is altered for AIX in order to build the export list before
5400# linking.
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5403$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404if test -z "$LINKCC"
5405then
5406 LINKCC='$(PURIFY) $(MAINCC)'
5407 case $ac_sys_system in
5408 AIX*)
5409 exp_extra="\"\""
5410 if test $ac_sys_release -ge 5 -o \
5411 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5412 exp_extra="."
5413 fi
5414 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 QNX*)
5416 # qcc must be used because the other compilers do not
5417 # support -N.
5418 LINKCC=qcc;;
5419 esac
5420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5422$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
5424# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5425# make sure we default having it set to "no": this is used by
5426# distutils.unixccompiler to know if it should add --enable-new-dtags
5427# to linker command lines, and failing to detect GNU ld simply results
5428# in the same bahaviour as before.
5429
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5431$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432ac_prog=ld
5433if test "$GCC" = yes; then
5434 ac_prog=`$CC -print-prog-name=ld`
5435fi
5436case `"$ac_prog" -V 2>&1 < /dev/null` in
5437 *GNU*)
5438 GNULD=yes;;
5439 *)
5440 GNULD=no;;
5441esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5443$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5446$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005447if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005448 $as_echo_n "(cached) " >&6
5449else
5450 ac_cv_c_inline=no
5451for ac_kw in inline __inline__ __inline; do
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453/* end confdefs.h. */
5454#ifndef __cplusplus
5455typedef int foo_t;
5456static $ac_kw foo_t static_foo () {return 0; }
5457$ac_kw foo_t foo () {return 0; }
5458#endif
5459
5460_ACEOF
5461if ac_fn_c_try_compile "$LINENO"; then :
5462 ac_cv_c_inline=$ac_kw
5463fi
5464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 test "$ac_cv_c_inline" != no && break
5466done
5467
5468fi
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5470$as_echo "$ac_cv_c_inline" >&6; }
5471
5472case $ac_cv_c_inline in
5473 inline | yes) ;;
5474 *)
5475 case $ac_cv_c_inline in
5476 no) ac_val=;;
5477 *) ac_val=$ac_cv_c_inline;;
5478 esac
5479 cat >>confdefs.h <<_ACEOF
5480#ifndef __cplusplus
5481#define inline $ac_val
5482#endif
5483_ACEOF
5484 ;;
5485esac
5486
5487if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005488
5489$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005490
5491
5492fi
5493
5494
Matthias Kloseb9621712010-04-24 17:59:49 +00005495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5496$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005498if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 enableval=$enable_shared;
5500fi
5501
5502
5503if test -z "$enable_shared"
5504then
5505 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005506 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507 enable_shared="yes";;
5508 *)
5509 enable_shared="no";;
5510 esac
5511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5513$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514
Matthias Kloseb9621712010-04-24 17:59:49 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5516$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005518if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005519 enableval=$enable_profiling;
5520fi
5521
5522if test "x$enable_profiling" = xyes; then
5523 ac_save_cc="$CC"
5524 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526/* end confdefs.h. */
5527int main() { return 0; }
5528_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005529if ac_fn_c_try_link "$LINENO"; then :
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005532 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005534rm -f core conftest.err conftest.$ac_objext \
5535 conftest$ac_exeext conftest.$ac_ext
5536 CC="$ac_save_cc"
5537else
5538 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5541$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543if test "x$enable_profiling" = xyes; then
5544 BASECFLAGS="-pg $BASECFLAGS"
5545 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546fi
5547
Matthias Kloseb9621712010-04-24 17:59:49 +00005548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5549$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550
5551# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5552# library that we build, but we do not want to link against it (we
5553# will find it with a -framework option). For this reason there is an
5554# extra variable BLDLIBRARY against which Python and the extension
5555# modules are linked, BLDLIBRARY. This is normally the same as
5556# LDLIBRARY, but empty for MacOSX framework builds.
5557if test "$enable_framework"
5558then
5559 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5560 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5561 BLDLIBRARY=''
5562else
5563 BLDLIBRARY='$(LDLIBRARY)'
5564fi
5565
5566# Other platforms follow
5567if test $enable_shared = "yes"; then
5568
Matthias Kloseb9621712010-04-24 17:59:49 +00005569$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
5571 case $ac_sys_system in
5572 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005573 LDLIBRARY='libpython$(LDVERSION).dll.a'
5574 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 ;;
5576 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005577 LDLIBRARY='libpython$(LDVERSION).so'
5578 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5580 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005581 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005582 then
5583 PY3LIBRARY=libpython3.so
5584 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005586 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005587 LDLIBRARY='libpython$(LDVERSION).so'
5588 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5590 case $ac_sys_system in
5591 FreeBSD*)
5592 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5593 ;;
5594 esac
5595 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005596 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005597 then
5598 PY3LIBRARY=libpython3.so
5599 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 ;;
5601 hp*|HP*)
5602 case `uname -m` in
5603 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005604 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 ;;
5606 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005607 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 ;;
5609 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005610 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5612 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005614 LDLIBRARY='libpython$(LDVERSION).dylib'
5615 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5617 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005618 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005619 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005620 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5621 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622
5623 esac
5624else # shared is disabled
5625 case $ac_sys_system in
5626 CYGWIN*)
5627 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005628 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 ;;
5630 esac
5631fi
5632
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005633if test "$cross_compiling" = yes; then
5634 RUNSHARED=
5635fi
5636
Matthias Kloseb9621712010-04-24 17:59:49 +00005637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5638$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
5640if test -n "$ac_tool_prefix"; then
5641 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5642set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005645if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647else
5648 if test -n "$RANLIB"; then
5649 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5650else
5651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654 IFS=$as_save_IFS
5655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 break 2
5661 fi
5662done
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664IFS=$as_save_IFS
5665
5666fi
5667fi
5668RANLIB=$ac_cv_prog_RANLIB
5669if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5671$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672else
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5674$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675fi
5676
5677
5678fi
5679if test -z "$ac_cv_prog_RANLIB"; then
5680 ac_ct_RANLIB=$RANLIB
5681 # Extract the first word of "ranlib", so it can be a program name with args.
5682set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005685if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687else
5688 if test -n "$ac_ct_RANLIB"; then
5689 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5690else
5691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694 IFS=$as_save_IFS
5695 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 break 2
5701 fi
5702done
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704IFS=$as_save_IFS
5705
5706fi
5707fi
5708ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5709if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5711$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715fi
5716
5717 if test "x$ac_ct_RANLIB" = x; then
5718 RANLIB=":"
5719 else
5720 case $cross_compiling:$ac_tool_warned in
5721yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724ac_tool_warned=yes ;;
5725esac
5726 RANLIB=$ac_ct_RANLIB
5727 fi
5728else
5729 RANLIB="$ac_cv_prog_RANLIB"
5730fi
5731
5732
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005733if test -n "$ac_tool_prefix"; then
5734 for ac_prog in ar aal
5735 do
5736 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005740if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
5743 if test -n "$AR"; then
5744 ac_cv_prog_AR="$AR" # Let the user override the test.
5745else
5746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749 IFS=$as_save_IFS
5750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005751 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005753 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 break 2
5756 fi
5757done
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759IFS=$as_save_IFS
5760
5761fi
5762fi
5763AR=$ac_cv_prog_AR
5764if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5766$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770fi
5771
5772
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005773 test -n "$AR" && break
5774 done
5775fi
5776if test -z "$AR"; then
5777 ac_ct_AR=$AR
5778 for ac_prog in ar aal
5779do
5780 # Extract the first word of "$ac_prog", so it can be a program name with args.
5781set dummy $ac_prog; ac_word=$2
5782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783$as_echo_n "checking for $ac_word... " >&6; }
5784if ${ac_cv_prog_ac_ct_AR+:} false; then :
5785 $as_echo_n "(cached) " >&6
5786else
5787 if test -n "$ac_ct_AR"; then
5788 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5789else
5790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793 IFS=$as_save_IFS
5794 test -z "$as_dir" && as_dir=.
5795 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797 ac_cv_prog_ac_ct_AR="$ac_prog"
5798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799 break 2
5800 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005802 done
5803IFS=$as_save_IFS
5804
5805fi
5806fi
5807ac_ct_AR=$ac_cv_prog_ac_ct_AR
5808if test -n "$ac_ct_AR"; then
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5810$as_echo "$ac_ct_AR" >&6; }
5811else
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817 test -n "$ac_ct_AR" && break
5818done
5819
5820 if test "x$ac_ct_AR" = x; then
5821 AR="ar"
5822 else
5823 case $cross_compiling:$ac_tool_warned in
5824yes:)
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5827ac_tool_warned=yes ;;
5828esac
5829 AR=$ac_ct_AR
5830 fi
5831fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832
5833
5834# tweak ARFLAGS only if the user didn't set it on the command line
5835
5836if test -z "$ARFLAGS"
5837then
5838 ARFLAGS="rc"
5839fi
5840
doko@ubuntu.com58844492012-06-30 18:25:32 +02005841if test -n "$ac_tool_prefix"; then
5842 for ac_prog in readelf
5843 do
5844 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_prog_READELF+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850else
5851 if test -n "$READELF"; then
5852 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5853else
5854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857 IFS=$as_save_IFS
5858 test -z "$as_dir" && as_dir=.
5859 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005861 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863 break 2
5864 fi
5865done
5866 done
5867IFS=$as_save_IFS
5868
5869fi
5870fi
5871READELF=$ac_cv_prog_READELF
5872if test -n "$READELF"; then
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5874$as_echo "$READELF" >&6; }
5875else
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
5878fi
5879
5880
5881 test -n "$READELF" && break
5882 done
5883fi
5884if test -z "$READELF"; then
5885 ac_ct_READELF=$READELF
5886 for ac_prog in readelf
5887do
5888 # Extract the first word of "$ac_prog", so it can be a program name with args.
5889set dummy $ac_prog; ac_word=$2
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891$as_echo_n "checking for $ac_word... " >&6; }
5892if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5893 $as_echo_n "(cached) " >&6
5894else
5895 if test -n "$ac_ct_READELF"; then
5896 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5897else
5898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH
5900do
5901 IFS=$as_save_IFS
5902 test -z "$as_dir" && as_dir=.
5903 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005905 ac_cv_prog_ac_ct_READELF="$ac_prog"
5906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907 break 2
5908 fi
5909done
5910 done
5911IFS=$as_save_IFS
5912
5913fi
5914fi
5915ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5916if test -n "$ac_ct_READELF"; then
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5918$as_echo "$ac_ct_READELF" >&6; }
5919else
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925 test -n "$ac_ct_READELF" && break
5926done
5927
5928 if test "x$ac_ct_READELF" = x; then
5929 READELF=":"
5930 else
5931 case $cross_compiling:$ac_tool_warned in
5932yes:)
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5935ac_tool_warned=yes ;;
5936esac
5937 READELF=$ac_ct_READELF
5938 fi
5939fi
5940
5941if test "$cross_compiling" = yes; then
5942 case "$READELF" in
5943 readelf|:)
5944 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5945 ;;
5946 esac
5947fi
5948
5949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005951DISABLE_ASDLGEN=""
5952# Extract the first word of "python", so it can be a program name with args.
5953set dummy python; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005956if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005957 $as_echo_n "(cached) " >&6
5958else
5959 if test -n "$HAS_PYTHON"; then
5960 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
5967 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04005968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005969 ac_cv_prog_HAS_PYTHON="found"
5970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971 break 2
5972 fi
5973done
5974 done
5975IFS=$as_save_IFS
5976
5977 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5978fi
5979fi
5980HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5981if test -n "$HAS_PYTHON"; then
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5983$as_echo "$HAS_PYTHON" >&6; }
5984else
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987fi
5988
5989
5990if test $HAS_HG != found -o $HAS_PYTHON != found
5991then
5992 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5993fi
5994
5995
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996case $MACHDEP in
5997bsdos*|hp*|HP*)
5998 # install -d does not work on BSDI or HP-UX
5999 if test -z "$INSTALL"
6000 then
6001 INSTALL="${srcdir}/install-sh -c"
6002 fi
6003esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004# Find a good install program. We prefer a C program (faster),
6005# so one script is as good as another. But avoid the broken or
6006# incompatible versions:
6007# SysV /etc/install, /usr/sbin/install
6008# SunOS /usr/etc/install
6009# IRIX /sbin/install
6010# AIX /bin/install
6011# AmigaOS /C/install, which installs bootblocks on floppy discs
6012# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6013# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6014# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6015# OS/2's system install, which has a completely different semantic
6016# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006017# Reject install programs that cannot install multiple files.
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6019$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006021if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023else
6024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 # Account for people who put trailing slashes in PATH elements.
6030case $as_dir/ in #((
6031 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 /usr/ucb/* ) ;;
6035 *)
6036 # OSF1 and SCO ODT 3.0 have their own names for install.
6037 # Don't use installbsd from OSF since it installs stuff as root
6038 # by default.
6039 for ac_prog in ginstall scoinst install; do
6040 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04006041 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 if test $ac_prog = install &&
6043 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6044 # AIX install. It has an incompatible calling convention.
6045 :
6046 elif test $ac_prog = install &&
6047 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6048 # program-specific install script used by HP pwplus--don't use.
6049 :
6050 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 rm -rf conftest.one conftest.two conftest.dir
6052 echo one > conftest.one
6053 echo two > conftest.two
6054 mkdir conftest.dir
6055 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6056 test -s conftest.one && test -s conftest.two &&
6057 test -s conftest.dir/conftest.one &&
6058 test -s conftest.dir/conftest.two
6059 then
6060 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6061 break 3
6062 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063 fi
6064 fi
6065 done
6066 done
6067 ;;
6068esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006069
6070 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071IFS=$as_save_IFS
6072
Matthias Kloseb9621712010-04-24 17:59:49 +00006073rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074
6075fi
6076 if test "${ac_cv_path_install+set}" = set; then
6077 INSTALL=$ac_cv_path_install
6078 else
6079 # As a last resort, use the slow shell script. Don't cache a
6080 # value for INSTALL within a source directory, because that will
6081 # break other packages using the cache if that directory is
6082 # removed, or if the value is a relative name.
6083 INSTALL=$ac_install_sh
6084 fi
6085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6087$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088
6089# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6090# It thinks the first close brace ends the variable substitution.
6091test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6092
6093test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6094
6095test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6096
Matthias Klose93a0ef12012-03-15 18:08:34 +01006097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6098$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6099if test -z "$MKDIR_P"; then
6100 if ${ac_cv_path_mkdir+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6105do
6106 IFS=$as_save_IFS
6107 test -z "$as_dir" && as_dir=.
6108 for ac_prog in mkdir gmkdir; do
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04006110 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006111 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6112 'mkdir (GNU coreutils) '* | \
6113 'mkdir (coreutils) '* | \
6114 'mkdir (fileutils) '4.1*)
6115 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6116 break 3;;
6117 esac
6118 done
6119 done
6120 done
6121IFS=$as_save_IFS
6122
6123fi
6124
6125 test -d ./--version && rmdir ./--version
6126 if test "${ac_cv_path_mkdir+set}" = set; then
6127 MKDIR_P="$ac_cv_path_mkdir -p"
6128 else
6129 # As a last resort, use the slow shell script. Don't cache a
6130 # value for MKDIR_P within a source directory, because that will
6131 # break other packages using the cache if that directory is
6132 # removed, or if the value is a relative name.
6133 MKDIR_P="$ac_install_sh -d"
6134 fi
6135fi
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6137$as_echo "$MKDIR_P" >&6; }
6138
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139
6140# Not every filesystem supports hard links
6141
6142if test -z "$LN" ; then
6143 case $ac_sys_system in
6144 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145 *) LN=ln;;
6146 esac
6147fi
6148
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006149# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006150
6151ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6155$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
6157# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006158if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 withval=$with_pydebug;
6160if test "$withval" != no
6161then
6162
Matthias Kloseb9621712010-04-24 17:59:49 +00006163$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6166$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006168 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006169else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6170$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171fi
6172else
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175fi
6176
6177
6178# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6179# merged with this chunk of code?
6180
6181# Optimizer/debugger flags
6182# ------------------------
6183# (The following bit of code is complicated enough - please keep things
6184# indented properly. Just pretend you're editing Python code. ;-)
6185
6186# There are two parallel sets of case statements below, one that checks to
6187# see if OPT was set and one that does BASECFLAGS setting based upon
6188# compiler and platform. BASECFLAGS tweaks need to be made even if the
6189# user set OPT.
6190
6191# tweak OPT based on compiler and platform, only if the user didn't set
6192# it on the command line
6193
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006194if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195then
6196 case $GCC in
6197 yes)
6198 if test "$CC" != 'g++' ; then
6199 STRICT_PROTO="-Wstrict-prototypes"
6200 fi
6201 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6202 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6203 WRAP="-fwrapv"
6204 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006205
6206 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006207 case $CC in
6208 *clang*) WRAP="-fwrapv"
6209 ;;
6210 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 case $ac_cv_prog_cc_g in
6213 yes)
6214 if test "$Py_DEBUG" = 'true' ; then
6215 # Optimization messes up debuggers, so turn it off for
6216 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006217 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 else
6219 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6220 fi
6221 ;;
6222 *)
6223 OPT="-O3 -Wall $STRICT_PROTO"
6224 ;;
6225 esac
6226 case $ac_sys_system in
6227 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6228 ;;
6229 esac
6230 ;;
6231
6232 *)
6233 OPT="-O"
6234 ;;
6235 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236fi
6237
6238
6239
6240# The -arch flags for universal builds on OSX
6241UNIVERSAL_ARCH_FLAGS=
6242
6243
6244# tweak BASECFLAGS based on compiler and platform
6245case $GCC in
6246yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006247 # Python doesn't violate C99 aliasing rules, but older versions of
6248 # GCC produce warnings for legal Python code. Enable
6249 # -fno-strict-aliasing on versions of GCC that support but produce
6250 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6252$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253 ac_save_cc="$CC"
6254 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006255 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006256 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006258else
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006261
Matthias Kloseb159a552010-04-25 21:00:44 +00006262
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006263int
6264main ()
6265{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006266
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006267 ;
6268 return 0;
6269}
Matthias Kloseb159a552010-04-25 21:00:44 +00006270
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006272if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006273
6274 CC="$ac_save_cc -fstrict-aliasing"
6275 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006277/* end confdefs.h. */
6278
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006279 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006280int
6281main ()
6282{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006283double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006284 ;
6285 return 0;
6286}
Matthias Kloseb159a552010-04-25 21:00:44 +00006287
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006289if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
6291 ac_cv_no_strict_aliasing=no
6292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293else
Matthias Kloseb159a552010-04-25 21:00:44 +00006294
6295 ac_cv_no_strict_aliasing=yes
6296
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006297fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006299
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006300else
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 ac_cv_no_strict_aliasing=no
6303
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006306fi
6307
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6311$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 then
6314 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6315 fi
6316
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6318$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6319 ac_save_cc="$CC"
6320 CC="$CC -Wunused-result -Werror"
6321 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006322 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006323 $as_echo_n "(cached) " >&6
6324else
6325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6326/* end confdefs.h. */
6327
6328
6329int
6330main ()
6331{
6332
6333 ;
6334 return 0;
6335}
6336
6337_ACEOF
6338if ac_fn_c_try_compile "$LINENO"; then :
6339
6340 ac_cv_disable_unused_result_warning=yes
6341
6342else
6343
6344 ac_cv_disable_unused_result_warning=no
6345
6346fi
6347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6348fi
6349
6350 CFLAGS="$save_CFLAGS"
6351 CC="$ac_save_cc"
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6353$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6354
6355 if test $ac_cv_disable_unused_result_warning = yes
6356 then
6357 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6358 fi
6359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6361 # support. Without this, treatment of subnormals doesn't follow
6362 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006363 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364 alpha*)
6365 BASECFLAGS="$BASECFLAGS -mieee"
6366 ;;
6367 esac
6368
6369 case $ac_sys_system in
6370 SCO_SV*)
6371 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6372 ;;
6373 # is there any other compiler on Darwin besides gcc?
6374 Darwin*)
6375 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6376 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006377 if test "${CC}" = gcc
6378 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6380$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006381 case "${UNIVERSALSDK}" in
6382 */MacOSX10.4u.sdk)
6383 # Build using 10.4 SDK, force usage of gcc when the
6384 # compiler is gcc, otherwise the user will get very
6385 # confusing error messages when building on OSX 10.6
6386 CC=gcc-4.0
6387 CPP=cpp-4.0
6388 ;;
6389 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6391$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006392 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
6394
6395 if test "${enable_universalsdk}"; then
6396 UNIVERSAL_ARCH_FLAGS=""
6397 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6398 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6399 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006400 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6402 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006403 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006404 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405
6406 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6407 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006408 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006409 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006411 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6412 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006413 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006414 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006415
6416 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6417 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006418 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006419 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006420
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006422 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 +00006423
6424 fi
6425
6426
Ronald Oussoren666028b2010-04-18 19:07:43 +00006427 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6428 if test "${UNIVERSALSDK}" != "/"
6429 then
6430 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6431 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006432 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 fi
6434 fi
6435
6436 # Calculate the right deployment target for this build.
6437 #
6438 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006439 if test ${cur_target} '>' 10.2 && \
6440 test ${cur_target} '<' 10.6
6441 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006443 if test ${enable_universalsdk}; then
6444 if test "${UNIVERSAL_ARCHS}" = "all"; then
6445 # Ensure that the default platform for a
6446 # 4-way universal build is OSX 10.5,
6447 # that's the first OS release where
6448 # 4-way builds make sense.
6449 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006450
6451 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6452 cur_target='10.5'
6453
6454 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6455 cur_target='10.5'
6456
6457 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6458 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006459 fi
6460 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006461 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006462 # On Intel macs default to a deployment
6463 # target of 10.4, that's the first OSX
6464 # release with Intel support.
6465 cur_target="10.4"
6466 fi
6467 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468 fi
6469 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6470
6471 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6472 # environment with a value that is the same as what we'll use
6473 # in the Makefile to ensure that we'll get the same compiler
6474 # environment during configure and build time.
6475 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6476 export MACOSX_DEPLOYMENT_TARGET
6477 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6478
6479 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006480 esac
6481 ;;
6482
6483*)
6484 case $ac_sys_system in
6485 OpenUNIX*|UnixWare*)
6486 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6487 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488 SCO_SV*)
6489 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6490 ;;
6491 esac
6492 ;;
6493esac
6494
6495if test "$Py_DEBUG" = 'true'; then
6496 :
6497else
6498 OPT="-DNDEBUG $OPT"
6499fi
6500
6501if test "$ac_arch_flags"
6502then
6503 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6504fi
6505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506# Check whether GCC supports PyArg_ParseTuple format
6507if test "$GCC" = "yes"
6508then
Matthias Kloseb9621712010-04-24 17:59:49 +00006509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6510$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511 save_CFLAGS=$CFLAGS
6512 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514/* end confdefs.h. */
6515
6516 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517int
6518main ()
6519{
6520
6521 ;
6522 return 0;
6523}
Matthias Kloseb159a552010-04-25 21:00:44 +00006524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006526if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527
Matthias Kloseb159a552010-04-25 21:00:44 +00006528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530
Matthias Kloseb159a552010-04-25 21:00:44 +00006531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006532$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534else
Matthias Kloseb159a552010-04-25 21:00:44 +00006535
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006537$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538
6539fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6541 CFLAGS=$save_CFLAGS
6542fi
6543
6544# On some compilers, pthreads are available without further options
6545# (e.g. MacOS X). On some of these systems, the compiler will not
6546# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6547# So we have to see first whether pthreads are available without
6548# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6550$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006551if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006552 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553else
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555 ac_cv_pthread_is_default=no
6556else
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558/* end confdefs.h. */
6559
6560#include <pthread.h>
6561
6562void* routine(void* p){return NULL;}
6563
6564int main(){
6565 pthread_t p;
6566 if(pthread_create(&p,NULL,routine,NULL)!=0)
6567 return 1;
6568 (void)pthread_detach(p);
6569 return 0;
6570}
6571
6572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006573if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574
6575 ac_cv_pthread_is_default=yes
6576 ac_cv_kthread=no
6577 ac_cv_pthread=no
6578
6579else
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584fi
6585
6586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587fi
6588
Matthias Kloseb9621712010-04-24 17:59:49 +00006589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6590$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591
6592
6593if test $ac_cv_pthread_is_default = yes
6594then
6595 ac_cv_kpthread=no
6596else
6597# -Kpthread, if available, provides the right #defines
6598# and linker options to make pthread_create available
6599# Some compilers won't report that they do not support -Kpthread,
6600# so we need to run a program to see whether it really made the
6601# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6603$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006604if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606else
6607 ac_save_cc="$CC"
6608CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006609if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 ac_cv_kpthread=no
6611else
Matthias Kloseb9621712010-04-24 17:59:49 +00006612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613/* end confdefs.h. */
6614
6615#include <pthread.h>
6616
6617void* routine(void* p){return NULL;}
6618
6619int main(){
6620 pthread_t p;
6621 if(pthread_create(&p,NULL,routine,NULL)!=0)
6622 return 1;
6623 (void)pthread_detach(p);
6624 return 0;
6625}
6626
6627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006628if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629 ac_cv_kpthread=yes
6630else
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635fi
6636
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637CC="$ac_save_cc"
6638fi
6639
Matthias Kloseb9621712010-04-24 17:59:49 +00006640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6641$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642fi
6643
6644if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6645then
6646# -Kthread, if available, provides the right #defines
6647# and linker options to make pthread_create available
6648# Some compilers won't report that they do not support -Kthread,
6649# so we need to run a program to see whether it really made the
6650# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6652$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006653if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655else
6656 ac_save_cc="$CC"
6657CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006658if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659 ac_cv_kthread=no
6660else
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662/* end confdefs.h. */
6663
6664#include <pthread.h>
6665
6666void* routine(void* p){return NULL;}
6667
6668int main(){
6669 pthread_t p;
6670 if(pthread_create(&p,NULL,routine,NULL)!=0)
6671 return 1;
6672 (void)pthread_detach(p);
6673 return 0;
6674}
6675
6676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006677if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 ac_cv_kthread=yes
6679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684fi
6685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686CC="$ac_save_cc"
6687fi
6688
Matthias Kloseb9621712010-04-24 17:59:49 +00006689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6690$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
6692
6693if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6694then
6695# -pthread, if available, provides the right #defines
6696# and linker options to make pthread_create available
6697# Some compilers won't report that they do not support -pthread,
6698# so we need to run a program to see whether it really made the
6699# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6701$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006702if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704else
6705 ac_save_cc="$CC"
6706CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006707if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708 ac_cv_pthread=no
6709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711/* end confdefs.h. */
6712
6713#include <pthread.h>
6714
6715void* routine(void* p){return NULL;}
6716
6717int main(){
6718 pthread_t p;
6719 if(pthread_create(&p,NULL,routine,NULL)!=0)
6720 return 1;
6721 (void)pthread_detach(p);
6722 return 0;
6723}
6724
6725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ac_cv_pthread=yes
6728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733fi
6734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735CC="$ac_save_cc"
6736fi
6737
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6739$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740fi
6741
6742# If we have set a CC compiler flag for thread support then
6743# check if it works for CXX, too.
6744ac_cv_cxx_thread=no
6745if test ! -z "$CXX"
6746then
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6748$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749ac_save_cxx="$CXX"
6750
6751if test "$ac_cv_kpthread" = "yes"
6752then
6753 CXX="$CXX -Kpthread"
6754 ac_cv_cxx_thread=yes
6755elif test "$ac_cv_kthread" = "yes"
6756then
6757 CXX="$CXX -Kthread"
6758 ac_cv_cxx_thread=yes
6759elif test "$ac_cv_pthread" = "yes"
6760then
6761 CXX="$CXX -pthread"
6762 ac_cv_cxx_thread=yes
6763fi
6764
6765if test $ac_cv_cxx_thread = yes
6766then
6767 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6768 $CXX -c conftest.$ac_ext 2>&5
6769 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6770 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6771 then
6772 ac_cv_cxx_thread=yes
6773 else
6774 ac_cv_cxx_thread=no
6775 fi
6776 rm -fr conftest*
6777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6779$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780fi
6781CXX="$ac_save_cxx"
6782
6783
6784# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6786$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006787if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789else
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791/* end confdefs.h. */
6792#include <stdlib.h>
6793#include <stdarg.h>
6794#include <string.h>
6795#include <float.h>
6796
6797int
6798main ()
6799{
6800
6801 ;
6802 return 0;
6803}
6804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006805if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806 ac_cv_header_stdc=yes
6807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6811
6812if test $ac_cv_header_stdc = yes; then
6813 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815/* end confdefs.h. */
6816#include <string.h>
6817
6818_ACEOF
6819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 $EGREP "memchr" >/dev/null 2>&1; then :
6821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822else
6823 ac_cv_header_stdc=no
6824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006825rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826
6827fi
6828
6829if test $ac_cv_header_stdc = yes; then
6830 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832/* end confdefs.h. */
6833#include <stdlib.h>
6834
6835_ACEOF
6836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006837 $EGREP "free" >/dev/null 2>&1; then :
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839else
6840 ac_cv_header_stdc=no
6841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006842rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843
6844fi
6845
6846if test $ac_cv_header_stdc = yes; then
6847 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 :
6850else
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853#include <ctype.h>
6854#include <stdlib.h>
6855#if ((' ' & 0x0FF) == 0x020)
6856# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6857# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6858#else
6859# define ISLOWER(c) \
6860 (('a' <= (c) && (c) <= 'i') \
6861 || ('j' <= (c) && (c) <= 'r') \
6862 || ('s' <= (c) && (c) <= 'z'))
6863# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6864#endif
6865
6866#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6867int
6868main ()
6869{
6870 int i;
6871 for (i = 0; i < 256; i++)
6872 if (XOR (islower (i), ISLOWER (i))
6873 || toupper (i) != TOUPPER (i))
6874 return 2;
6875 return 0;
6876}
6877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006878if ac_fn_c_try_run "$LINENO"; then :
6879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880else
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885fi
6886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887fi
6888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6890$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891if test $ac_cv_header_stdc = yes; then
6892
Matthias Kloseb9621712010-04-24 17:59:49 +00006893$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894
6895fi
6896
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006897ac_save_cppflags="$CPPFLAGS"
6898CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006899for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006900fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006901ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006902sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006903unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006904poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006905sys/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 +01006906sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006907sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006908sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006909sys/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 -07006910libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006911bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006912do :
6913 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6914ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006915if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006917#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006918_ACEOF
6919
6920fi
6921
Guido van Rossum627b2d71993-12-24 10:39:16 +00006922done
6923
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006924CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006926for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6929$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006930if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006934/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006935#include <sys/types.h>
6936#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
6941if ((DIR *) 0)
6942return 0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006949else
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006954eval ac_res=\$$as_ac_Header
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6956$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006957if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006959#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006960_ACEOF
6961
6962ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006965done
6966# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6967if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6969$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006970if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972else
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977/* Override any GCC internal prototype to avoid an error.
6978 Use char because int might match the return type of a GCC
6979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006980#ifdef __cplusplus
6981extern "C"
6982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006983char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006984int
6985main ()
6986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006987return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006988 ;
6989 return 0;
6990}
6991_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992for ac_lib in '' dir; do
6993 if test -z "$ac_lib"; then
6994 ac_res="none required"
6995 else
6996 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006997 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002rm -f core conftest.err conftest.$ac_objext \
7003 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007004 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007005 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007done
Victor Stinnere0be4232011-10-25 13:06:09 +02007008if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010else
7011 ac_cv_search_opendir=no
7012fi
7013rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007014LIBS=$ac_func_search_save_LIBS
7015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7017$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007019if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007023
Michael W. Hudson54241132001-12-07 15:38:26 +00007024else
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7026$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007027if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007029else
7030 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007034/* Override any GCC internal prototype to avoid an error.
7035 Use char because int might match the return type of a GCC
7036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007037#ifdef __cplusplus
7038extern "C"
7039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007040char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007041int
7042main ()
7043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 ;
7046 return 0;
7047}
7048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049for ac_lib in '' x; do
7050 if test -z "$ac_lib"; then
7051 ac_res="none required"
7052 else
7053 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059rm -f core conftest.err conftest.$ac_objext \
7060 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007061 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064done
Victor Stinnere0be4232011-10-25 13:06:09 +02007065if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067else
7068 ac_cv_search_opendir=no
7069fi
7070rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007071LIBS=$ac_func_search_save_LIBS
7072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7074$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007076if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079fi
7080
7081fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007082
Matthias Kloseb9621712010-04-24 17:59:49 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7084$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007085if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007087else
Matthias Kloseb9621712010-04-24 17:59:49 +00007088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007089/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007090#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007091int
7092main ()
7093{
7094return makedev(0, 0);
7095 ;
7096 return 0;
7097}
7098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007100 ac_cv_header_sys_types_h_makedev=yes
7101else
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104rm -f core conftest.err conftest.$ac_objext \
7105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007106
7107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7109$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007110
7111if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007112ac_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 +02007113if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007114
Matthias Kloseb9621712010-04-24 17:59:49 +00007115$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007116
7117fi
7118
7119
7120
7121 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 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 +02007123if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007126
7127fi
7128
7129
7130 fi
7131fi
7132
Michael W. Hudson54241132001-12-07 15:38:26 +00007133
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007134# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7135for ac_header in net/if.h
7136do :
7137 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7138#ifdef STDC_HEADERS
7139# include <stdlib.h>
7140# include <stddef.h>
7141#else
7142# ifdef HAVE_STDLIB_H
7143# include <stdlib.h>
7144# endif
7145#endif
7146#ifdef HAVE_SYS_SOCKET_H
7147# include <sys/socket.h>
7148#endif
7149
7150"
Victor Stinnere0be4232011-10-25 13:06:09 +02007151if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007152 cat >>confdefs.h <<_ACEOF
7153#define HAVE_NET_IF_H 1
7154_ACEOF
7155
7156fi
7157
7158done
7159
7160
7161
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007162# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007163for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007164do :
7165 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007166#ifdef HAVE_CURSES_H
7167#include <curses.h>
7168#endif
7169
Matthias Kloseb9621712010-04-24 17:59:49 +00007170"
Victor Stinnere0be4232011-10-25 13:06:09 +02007171if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007172 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007173#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007174_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007175
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007176fi
7177
7178done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007179
7180
Martin v. Löwis11017b12006-01-14 18:12:57 +00007181# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007182for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007183do :
7184 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 +00007185#ifdef HAVE_ASM_TYPES_H
7186#include <asm/types.h>
7187#endif
7188#ifdef HAVE_SYS_SOCKET_H
7189#include <sys/socket.h>
7190#endif
7191
Matthias Kloseb9621712010-04-24 17:59:49 +00007192"
Victor Stinnere0be4232011-10-25 13:06:09 +02007193if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007195#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007196_ACEOF
7197
7198fi
7199
7200done
7201
7202
Charles-François Natali47413c12011-10-06 19:47:44 +02007203# On Linux, can.h and can/raw.h require sys/socket.h
7204for ac_header in linux/can.h linux/can/raw.h
7205do :
7206 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7207ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7208#ifdef HAVE_SYS_SOCKET_H
7209#include <sys/socket.h>
7210#endif
7211
7212"
7213if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7214 cat >>confdefs.h <<_ACEOF
7215#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7216_ACEOF
7217
7218fi
7219
7220done
7221
7222
Guido van Rossum627b2d71993-12-24 10:39:16 +00007223# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007224was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7226$as_echo_n "checking for clock_t in time.h... " >&6; }
7227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007229#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007230
7231_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007234 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007235else
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007239
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007240
Guido van Rossum627b2d71993-12-24 10:39:16 +00007241fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007242rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7245$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7248$as_echo_n "checking for makedev... " >&6; }
7249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007250/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007251
Jesus Cea740f53a2010-04-28 11:35:30 +00007252#if defined(MAJOR_IN_MKDEV)
7253#include <sys/mkdev.h>
7254#elif defined(MAJOR_IN_SYSMACROS)
7255#include <sys/sysmacros.h>
7256#else
7257#include <sys/types.h>
7258#endif
7259
Neal Norwitz11690112002-07-30 01:08:28 +00007260int
7261main ()
7262{
Jesus Cea740f53a2010-04-28 11:35:30 +00007263
7264 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007265 ;
7266 return 0;
7267}
Matthias Kloseb159a552010-04-25 21:00:44 +00007268
Neal Norwitz11690112002-07-30 01:08:28 +00007269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007270if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007271 ac_cv_has_makedev=yes
7272else
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007275rm -f core conftest.err conftest.$ac_objext \
7276 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7278$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007279if test "$ac_cv_has_makedev" = "yes"; then
7280
Matthias Kloseb9621712010-04-24 17:59:49 +00007281$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007282
7283fi
7284
Martin v. Löwis399a6892002-10-04 10:22:02 +00007285# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7286# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7287# defined, but the compiler does not support pragma redefine_extname,
7288# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7289# structures (such as rlimit64) without declaring them. As a
7290# work-around, disable LFS on such configurations
7291
7292use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7294$as_echo_n "checking Solaris LFS bug... " >&6; }
7295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007296/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007297
7298#define _LARGEFILE_SOURCE 1
7299#define _FILE_OFFSET_BITS 64
7300#include <sys/resource.h>
7301
Martin v. Löwis399a6892002-10-04 10:22:02 +00007302int
7303main ()
7304{
7305struct rlimit foo;
7306 ;
7307 return 0;
7308}
7309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007311 sol_lfs_bug=no
7312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7317$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007318if test "$sol_lfs_bug" = "yes"; then
7319 use_lfs=no
7320fi
7321
7322if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007323# Two defines needed to enable largefile support on various platforms
7324# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007325case $ac_sys_system/$ac_sys_release in
7326AIX*)
7327
7328$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7329
7330 ;;
7331esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007332
Matthias Kloseb9621712010-04-24 17:59:49 +00007333$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007334
7335
Matthias Kloseb9621712010-04-24 17:59:49 +00007336$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007337
Martin v. Löwis399a6892002-10-04 10:22:02 +00007338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007339
Guido van Rossum84e7b241996-08-19 21:59:00 +00007340# Add some code to confdefs.h so that the test for off_t works on SCO
7341cat >> confdefs.h <<\EOF
7342#if defined(SCO_DS)
7343#undef _OFF_T
7344#endif
7345EOF
7346
Guido van Rossumef2255b2000-03-10 22:30:29 +00007347# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007348ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007349if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351else
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
7353cat >>confdefs.h <<_ACEOF
7354#define mode_t int
7355_ACEOF
7356
7357fi
7358
Matthias Kloseb9621712010-04-24 17:59:49 +00007359ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362else
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
7364cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007365#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007366_ACEOF
7367
7368fi
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007371if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373else
Martin v. Löwis11437992002-04-12 09:54:03 +00007374
7375cat >>confdefs.h <<_ACEOF
7376#define pid_t int
7377_ACEOF
7378
7379fi
7380
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007383#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007384_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007387if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007389else
Martin v. Löwis11437992002-04-12 09:54:03 +00007390
7391cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007392#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007393_ACEOF
7394
7395fi
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7398$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007399if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007403/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007404#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007405
7406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007409 ac_cv_type_uid_t=yes
7410else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007411 ac_cv_type_uid_t=no
7412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007413rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007414
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7417$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007418if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007419
Matthias Kloseb9621712010-04-24 17:59:49 +00007420$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007421
7422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424
7425fi
7426
Matthias Kloseb9621712010-04-24 17:59:49 +00007427ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7428case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007429 no|yes) ;; #(
7430 *)
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007433
7434
7435cat >>confdefs.h <<_ACEOF
7436#define uint32_t $ac_cv_c_uint32_t
7437_ACEOF
7438;;
7439 esac
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7442case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007443 no|yes) ;; #(
7444 *)
7445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007447
7448
7449cat >>confdefs.h <<_ACEOF
7450#define uint64_t $ac_cv_c_uint64_t
7451_ACEOF
7452;;
7453 esac
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7456case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007457 no|yes) ;; #(
7458 *)
7459
7460cat >>confdefs.h <<_ACEOF
7461#define int32_t $ac_cv_c_int32_t
7462_ACEOF
7463;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007464esac
7465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7467case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007468 no|yes) ;; #(
7469 *)
7470
7471cat >>confdefs.h <<_ACEOF
7472#define int64_t $ac_cv_c_int64_t
7473_ACEOF
7474;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007475esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007481
7482fi
7483
Stefan Krah1919b7e2012-03-21 18:25:23 +01007484ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7485if test "x$ac_cv_type___uint128_t" = xyes; then :
7486
7487$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7488
7489fi
7490
Jack Jansendd19cf82001-12-06 22:36:17 +00007491
Michael W. Hudson54241132001-12-07 15:38:26 +00007492# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007493# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007494# The cast to long int works around a bug in the HP C Compiler
7495# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7496# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7497# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7499$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007500if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 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 +00007504
Martin v. Löwis11437992002-04-12 09:54:03 +00007505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 if test "$ac_cv_type_int" = yes; then
7507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007509as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007510See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007511 else
7512 ac_cv_sizeof_int=0
7513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7518$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519
7520
7521
Martin v. Löwis11437992002-04-12 09:54:03 +00007522cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007523#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007524_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007525
7526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007527# The cast to long int works around a bug in the HP C Compiler
7528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7532$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007533if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 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 +00007537
Martin v. Löwis11437992002-04-12 09:54:03 +00007538else
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 if test "$ac_cv_type_long" = yes; then
7540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007542as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007543See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007544 else
7545 ac_cv_sizeof_long=0
7546 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7551$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007552
7553
7554
Martin v. Löwis11437992002-04-12 09:54:03 +00007555cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007556#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007557_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007558
7559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560# The cast to long int works around a bug in the HP C Compiler
7561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7565$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007566if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007568else
Matthias Kloseb9621712010-04-24 17:59:49 +00007569 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 +00007570
Martin v. Löwis11437992002-04-12 09:54:03 +00007571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 if test "$ac_cv_type_void_p" = yes; then
7573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007575as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007576See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007577 else
7578 ac_cv_sizeof_void_p=0
7579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7584$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585
7586
7587
Martin v. Löwis11437992002-04-12 09:54:03 +00007588cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007589#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007590_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007591
7592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593# The cast to long int works around a bug in the HP C Compiler
7594# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7595# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7596# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7598$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007599if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 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 +00007603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 if test "$ac_cv_type_short" = yes; then
7606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007608as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007609See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 else
7611 ac_cv_sizeof_short=0
7612 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7617$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618
7619
7620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007622#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007623_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007624
7625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626# The cast to long int works around a bug in the HP C Compiler
7627# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7628# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7629# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7631$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007632if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 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 +00007636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637else
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 if test "$ac_cv_type_float" = yes; then
7639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007641as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007642See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643 else
7644 ac_cv_sizeof_float=0
7645 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7650$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651
7652
7653
Martin v. Löwis11437992002-04-12 09:54:03 +00007654cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007655#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007656_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007657
7658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659# The cast to long int works around a bug in the HP C Compiler
7660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7664$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007665if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007667else
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 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 +00007669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670else
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 if test "$ac_cv_type_double" = yes; then
7672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007674as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 else
7677 ac_cv_sizeof_double=0
7678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7683$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684
7685
7686
Martin v. Löwis11437992002-04-12 09:54:03 +00007687cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007688#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007689_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007690
7691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692# The cast to long int works around a bug in the HP C Compiler
7693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7695# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7697$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007698if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 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 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 if test "$ac_cv_type_fpos_t" = yes; then
7705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007707as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007708See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709 else
7710 ac_cv_sizeof_fpos_t=0
7711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7716$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717
7718
7719
Martin v. Löwis11437992002-04-12 09:54:03 +00007720cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007721#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007722_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007723
Michael W. Hudson54241132001-12-07 15:38:26 +00007724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725# The cast to long int works around a bug in the HP C Compiler
7726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7728# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7730$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007731if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 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 +00007735
Martin v. Löwis18e16552006-02-15 17:27:45 +00007736else
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 if test "$ac_cv_type_size_t" = yes; then
7738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007740as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007741See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 else
7743 ac_cv_sizeof_size_t=0
7744 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746
Martin v. Löwis18e16552006-02-15 17:27:45 +00007747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7749$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750
7751
7752
Martin v. Löwis18e16552006-02-15 17:27:45 +00007753cat >>confdefs.h <<_ACEOF
7754#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7755_ACEOF
7756
7757
Christian Heimes400adb02008-02-01 08:12:03 +00007758# The cast to long int works around a bug in the HP C Compiler
7759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7763$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007764if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 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 +00007768
Christian Heimes400adb02008-02-01 08:12:03 +00007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 if test "$ac_cv_type_pid_t" = yes; then
7771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007773as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007774See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007775 else
7776 ac_cv_sizeof_pid_t=0
7777 fi
7778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779
Christian Heimes400adb02008-02-01 08:12:03 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7782$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007783
7784
7785
7786cat >>confdefs.h <<_ACEOF
7787#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7788_ACEOF
7789
7790
Michael W. Hudson54241132001-12-07 15:38:26 +00007791
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7793$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007794have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007796/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007797
Martin v. Löwis11437992002-04-12 09:54:03 +00007798int
7799main ()
7800{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007801long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807
7808
Matthias Kloseb9621712010-04-24 17:59:49 +00007809$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007811 have_long_long=yes
7812
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7816$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007817if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818# The cast to long int works around a bug in the HP C Compiler
7819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7823$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 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 +00007828
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if test "$ac_cv_type_long_long" = yes; then
7831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007833as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007834See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 else
7836 ac_cv_sizeof_long_long=0
7837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839
Martin v. Löwis11437992002-04-12 09:54:03 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7842$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843
7844
7845
Martin v. Löwis11437992002-04-12 09:54:03 +00007846cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007847#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007849
Michael W. Hudson54241132001-12-07 15:38:26 +00007850
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007851fi
7852
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7854$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007855have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007857/* end confdefs.h. */
7858
7859int
7860main ()
7861{
7862long double x; x = (long double)0;
7863 ;
7864 return 0;
7865}
7866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007867if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007868
7869
Matthias Kloseb9621712010-04-24 17:59:49 +00007870$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007871
7872 have_long_double=yes
7873
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007874fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7877$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007878if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007879# The cast to long int works around a bug in the HP C Compiler
7880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7882# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7884$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007885if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 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 +00007889
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 if test "$ac_cv_type_long_double" = yes; then
7892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007894as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007895See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007896 else
7897 ac_cv_sizeof_long_double=0
7898 fi
7899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7903$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007904
7905
7906
7907cat >>confdefs.h <<_ACEOF
7908#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7909_ACEOF
7910
7911
7912fi
7913
7914
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7916$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007917have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007919/* end confdefs.h. */
7920
7921int
7922main ()
7923{
7924_Bool x; x = (_Bool)0;
7925 ;
7926 return 0;
7927}
7928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007929if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007930
7931
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007933
7934 have_c99_bool=yes
7935
Thomas Woutersb2137042007-02-01 18:02:27 +00007936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7939$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007940if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941# The cast to long int works around a bug in the HP C Compiler
7942# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7943# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7944# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7946$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007947if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 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 +00007951
Thomas Woutersb2137042007-02-01 18:02:27 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 if test "$ac_cv_type__Bool" = yes; then
7954 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007956as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007957See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 else
7959 ac_cv_sizeof__Bool=0
7960 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962
Thomas Woutersb2137042007-02-01 18:02:27 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7965$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966
7967
7968
Thomas Woutersb2137042007-02-01 18:02:27 +00007969cat >>confdefs.h <<_ACEOF
7970#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7971_ACEOF
7972
7973
7974fi
7975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007977 #include <stdint.h>
7978 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007979 #ifdef HAVE_INTTYPES_H
7980 #include <inttypes.h>
7981 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007982"
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007984
7985cat >>confdefs.h <<_ACEOF
7986#define HAVE_UINTPTR_T 1
7987_ACEOF
7988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989# The cast to long int works around a bug in the HP C Compiler
7990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7994$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007995if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 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 +00007999
Martin v. Löwis11437992002-04-12 09:54:03 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 if test "$ac_cv_type_uintptr_t" = yes; then
8002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008004as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008005See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 else
8007 ac_cv_sizeof_uintptr_t=0
8008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8013$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014
8015
8016
Martin v. Löwis11437992002-04-12 09:54:03 +00008017cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008018#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008019_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008020
Michael W. Hudson54241132001-12-07 15:38:26 +00008021
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008022fi
8023
Thomas Wouters89f507f2006-12-13 04:49:30 +00008024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008025# The cast to long int works around a bug in the HP C Compiler
8026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8028# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8030$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008031if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008035#ifdef HAVE_SYS_TYPES_H
8036#include <sys/types.h>
8037#endif
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 if test "$ac_cv_type_off_t" = yes; then
8043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008045as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008046See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008047 else
8048 ac_cv_sizeof_off_t=0
8049 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8054$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008056
8057
Martin v. Löwis11437992002-04-12 09:54:03 +00008058cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008059#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008060_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008061
Michael W. Hudson54241132001-12-07 15:38:26 +00008062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8065$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008066if test "$have_long_long" = yes
8067then
8068if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008069 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8074$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008075else
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008078fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008079else
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8081$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008082fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084# The cast to long int works around a bug in the HP C Compiler
8085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8087# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8089$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008094#ifdef HAVE_SYS_TYPES_H
8095#include <sys/types.h>
8096#endif
8097#ifdef HAVE_TIME_H
8098#include <time.h>
8099#endif
8100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 if test "$ac_cv_type_time_t" = yes; then
8105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008107as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008108See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008109 else
8110 ac_cv_sizeof_time_t=0
8111 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8116$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008118
8119
Martin v. Löwis11437992002-04-12 09:54:03 +00008120cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008121#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008122_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008123
Michael W. Hudson54241132001-12-07 15:38:26 +00008124
8125
Trent Mick635f6fb2000-08-23 21:33:05 +00008126# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008127ac_save_cc="$CC"
8128if test "$ac_cv_kpthread" = "yes"
8129then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008130elif test "$ac_cv_kthread" = "yes"
8131then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008132elif test "$ac_cv_pthread" = "yes"
8133then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008134fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8137$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008138have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008141
8142 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008143int
8144main ()
8145{
Guido van Rossum12580492000-09-24 16:47:19 +00008146pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ;
8148 return 0;
8149}
Matthias Kloseb159a552010-04-25 21:00:44 +00008150
Martin v. Löwis11437992002-04-12 09:54:03 +00008151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008152if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008153 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8157$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008158if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8164$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169#ifdef HAVE_PTHREAD_H
8170#include <pthread.h>
8171#endif
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008175else
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 if test "$ac_cv_type_pthread_t" = yes; then
8177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008179as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008180See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008181 else
8182 ac_cv_sizeof_pthread_t=0
8183 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008185
Trent Mick635f6fb2000-08-23 21:33:05 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8188$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190
8191
Martin v. Löwis11437992002-04-12 09:54:03 +00008192cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008193#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008194_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008196
Trent Mick635f6fb2000-08-23 21:33:05 +00008197fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008198CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008199
Michael W. Hudson54241132001-12-07 15:38:26 +00008200
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008201case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008202 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008203 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8204 ;;
8205 Darwin/*)
8206 OTHER_LIBTOOL_OPT=""
8207 ;;
8208esac
8209
8210
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008211ARCH_RUN_32BIT=""
8212
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008213case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008214 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008215 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8216 if test "${enable_universalsdk}"; then
8217 :
8218 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008219 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008220 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008223 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008224 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008225 if test ${gcc_version} '<' 4.0
8226 then
8227 LIBTOOL_CRUFT="-lcc_dynamic"
8228 else
8229 LIBTOOL_CRUFT=""
8230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008232 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008235/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008236
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008237 #include <unistd.h>
8238 int main(int argc, char*argv[])
8239 {
8240 if (sizeof(long) == 4) {
8241 return 0;
8242 } else {
8243 return 1;
8244 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008245 }
8246
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008248if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008249 ac_osx_32bit=yes
8250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008255fi
8256
8257
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008258 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008259 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008260 i386)
8261 MACOSX_DEFAULT_ARCH="i386"
8262 ;;
8263 ppc)
8264 MACOSX_DEFAULT_ARCH="ppc"
8265 ;;
8266 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008267 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008268 ;;
8269 esac
8270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008271 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008272 i386)
8273 MACOSX_DEFAULT_ARCH="x86_64"
8274 ;;
8275 ppc)
8276 MACOSX_DEFAULT_ARCH="ppc64"
8277 ;;
8278 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008279 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008280 ;;
8281 esac
8282
8283 #ARCH_RUN_32BIT="true"
8284 fi
8285
8286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008289esac
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8292$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008293if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008294then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008295 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008297 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8302$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008303 if test $enable_shared = "yes"
8304 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008305 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 +00008306 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008310fi
8311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8313$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008314case $ac_sys_system/$ac_sys_release in
8315 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8320$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008321 ;;
8322 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008325 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008326esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008327
Guido van Rossum0a516c91994-09-12 10:58:40 +00008328# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008329
Michael W. Hudson54241132001-12-07 15:38:26 +00008330
8331
8332
8333
Benjamin Peterson99f03762010-04-11 22:15:28 +00008334
Thomas Wouters477c8d52006-05-27 19:21:47 +00008335
Georg Brandlb1441c72009-01-03 22:33:39 +00008336
Thomas Wouters477c8d52006-05-27 19:21:47 +00008337cat >>confdefs.h <<_ACEOF
8338#define SHLIB_EXT "$SO"
8339_ACEOF
8340
Guido van Rossum0a516c91994-09-12 10:58:40 +00008341# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008342# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008343# (Shared libraries in this instance are shared modules to be loaded into
8344# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8346$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008347if test -z "$LDSHARED"
8348then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008350 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008351 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008352 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008353 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008354 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008355 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008357 if test "$GCC" = "yes" ; then
8358 LDSHARED='$(CC) -shared'
8359 LDCXXSHARED='$(CXX) -shared'
8360 else
8361 LDSHARED='$(CC) -G'
8362 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008363 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008364 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008365 if test "$GCC" = "yes" ; then
8366 LDSHARED='$(CC) -shared'
8367 LDCXXSHARED='$(CXX) -shared'
8368 else
8369 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008370 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008371 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008372 LDSHARED='$(CC) -bundle'
8373 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008374 if test "$enable_framework" ; then
8375 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008376 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8377 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008378 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008379 else
8380 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008381 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008382 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008383 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008384 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008385 LDSHARED='$(CC) -bundle'
8386 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008387 if test "$enable_framework" ; then
8388 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008389 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8390 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008391 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008392 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008393 # No framework, use the Python app as bundle-loader
8394 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008395 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008396 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008397 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008398 Darwin/*)
8399 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8400 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008401
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008402 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008403 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008404 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008405 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008406 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008407 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8408 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008409 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008410 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008411 LDSHARED='$(CC) -bundle'
8412 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008413 if test "$enable_framework" ; then
8414 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008415 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8416 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008417 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008418 else
8419 # No framework, use the Python app as bundle-loader
8420 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8421 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008422 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008423 fi
8424 fi
8425 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008426 Linux*|GNU*|QNX*)
8427 LDSHARED='$(CC) -shared'
8428 LDCXXSHARED='$(CXX) -shared';;
8429 BSD/OS*/4*)
8430 LDSHARED="gcc -shared"
8431 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008432 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008433 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008434 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008435 LDSHARED='$(CC) -shared'
8436 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008437 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008438 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008439 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008440 OpenBSD*)
8441 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8442 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008443 LDSHARED='$(CC) -shared $(CCSHARED)'
8444 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008445 else
8446 case `uname -r` in
8447 [01].* | 2.[0-7] | 2.[0-7].*)
8448 LDSHARED="ld -Bshareable ${LDFLAGS}"
8449 ;;
8450 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008451 LDSHARED='$(CC) -shared $(CCSHARED)'
8452 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008453 ;;
8454 esac
8455 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008457 LDSHARED='$(CC) -shared'
8458 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008459 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008460 if test "$GCC" = "yes" ; then
8461 LDSHARED='$(CC) -shared'
8462 LDCXXSHARED='$(CXX) -shared'
8463 else
8464 LDSHARED='$(CC) -G'
8465 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008466 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008467 SCO_SV*)
8468 LDSHARED='$(CC) -Wl,-G,-Bexport'
8469 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8470 CYGWIN*)
8471 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8472 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008473 *) LDSHARED="ld";;
8474 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8477$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008478LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008479BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008480# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008481# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8483$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008484if test -z "$CCSHARED"
8485then
Guido van Rossum07397971997-04-29 21:49:50 +00008486 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008487 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008488 then CCSHARED="-fPIC";
8489 elif test `uname -p` = sparc;
8490 then CCSHARED="-xcode=pic32";
8491 else CCSHARED="-Kpic";
8492 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008493 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008494 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008495 else CCSHARED="+z";
8496 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008497 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008498 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008499 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008500 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008501 if test "$GCC" = "yes"
8502 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008503 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008504 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008505 SCO_SV*)
8506 if test "$GCC" = "yes"
8507 then CCSHARED="-fPIC"
8508 else CCSHARED="-Kpic -belf"
8509 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008510 IRIX*/6*) case $CC in
8511 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008512 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008513 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008514 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8517$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008518# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008519# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8521$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008522if test -z "$LINKFORSHARED"
8523then
Guido van Rossum07397971997-04-29 21:49:50 +00008524 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008525 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008526 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008527 LINKFORSHARED="-Wl,-E -Wl,+s";;
8528# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008529 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008530 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008531 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008533 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008534 if test "$enable_framework"
8535 then
Jack Jansenda49e192005-01-07 13:08:22 +00008536 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008537 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008538 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008539 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008540 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008541 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008542 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008543 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8544 then
8545 LINKFORSHARED="-Wl,--export-dynamic"
8546 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008547 SunOS/5*) case $CC in
8548 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008549 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008550 then
8551 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008552 fi;;
8553 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008554 CYGWIN*)
8555 if test $enable_shared = "no"
8556 then
8557 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8558 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008559 QNX*)
8560 # -Wl,-E causes the symbols to be added to the dynamic
8561 # symbol table so that they can be found when a module
8562 # is loaded. -N 2048K causes the stack size to be set
8563 # to 2048 kilobytes so that the stack doesn't overflow
8564 # when running test_compile.py.
8565 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8569$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008570
Michael W. Hudson54241132001-12-07 15:38:26 +00008571
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008572
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8574$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008575if test ! "$LIBRARY" = "$LDLIBRARY"
8576then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008577 case $ac_sys_system in
8578 CYGWIN*)
8579 # Cygwin needs CCSHARED when building extension DLLs
8580 # but not when building the interpreter DLL.
8581 CFLAGSFORSHARED='';;
8582 *)
8583 CFLAGSFORSHARED='$(CCSHARED)'
8584 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8587$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008588
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008589# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8590# library (with --enable-shared).
8591# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008592# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8593# if it is not required, since it creates a dependency of the shared library
8594# to LIBS. This, in turn, means that applications linking the shared libpython
8595# don't need to link LIBS explicitly. The default should be only changed
8596# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8599$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008600case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008601 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008602 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008603esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8605$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008606
8607
Guido van Rossum627b2d71993-12-24 10:39:16 +00008608# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8610$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008611if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008612 $as_echo_n "(cached) " >&6
8613else
8614 ac_check_lib_save_LIBS=$LIBS
8615LIBS="-lsendfile $LIBS"
8616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8617/* end confdefs.h. */
8618
8619/* Override any GCC internal prototype to avoid an error.
8620 Use char because int might match the return type of a GCC
8621 builtin and then its argument prototype would still apply. */
8622#ifdef __cplusplus
8623extern "C"
8624#endif
8625char sendfile ();
8626int
8627main ()
8628{
8629return sendfile ();
8630 ;
8631 return 0;
8632}
8633_ACEOF
8634if ac_fn_c_try_link "$LINENO"; then :
8635 ac_cv_lib_sendfile_sendfile=yes
8636else
8637 ac_cv_lib_sendfile_sendfile=no
8638fi
8639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
8641LIBS=$ac_check_lib_save_LIBS
8642fi
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8644$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008645if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008646 cat >>confdefs.h <<_ACEOF
8647#define HAVE_LIBSENDFILE 1
8648_ACEOF
8649
8650 LIBS="-lsendfile $LIBS"
8651
8652fi
8653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8655$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008656if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008660LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8689$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 cat >>confdefs.h <<_ACEOF
8692#define HAVE_LIBDL 1
8693_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008695 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697fi
8698 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8700$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008705LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709/* Override any GCC internal prototype to avoid an error.
8710 Use char because int might match the return type of a GCC
8711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712#ifdef __cplusplus
8713extern "C"
8714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008715char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008716int
8717main ()
8718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ;
8721 return 0;
8722}
8723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008726else
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729rm -f core conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008731LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8734$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008735if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 cat >>confdefs.h <<_ACEOF
8737#define HAVE_LIBDLD 1
8738_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008739
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008740 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008742fi
8743 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008744
Georg Brandlb1441c72009-01-03 22:33:39 +00008745# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008746if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8748$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008749if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008751else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008752 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756/* Override any GCC internal prototype to avoid an error.
8757 Use char because int might match the return type of a GCC
8758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759#ifdef __cplusplus
8760extern "C"
8761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008762char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ;
8768 return 0;
8769}
8770_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771for ac_lib in '' pthread rt posix4; do
8772 if test -z "$ac_lib"; then
8773 ac_res="none required"
8774 else
8775 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781rm -f core conftest.err conftest.$ac_objext \
8782 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008783 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786done
Victor Stinnere0be4232011-10-25 13:06:09 +02008787if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789else
8790 ac_cv_search_sem_init=no
8791fi
8792rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008793LIBS=$ac_func_search_save_LIBS
8794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8796$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008798if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008800
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008801fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008802 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008803 # posix4 on Solaris 2.6
8804 # pthread (first!) on Linux
8805fi
8806
Martin v. Löwis19d17342003-06-14 21:03:05 +00008807# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8809$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008810if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812else
8813 ac_check_lib_save_LIBS=$LIBS
8814LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008816/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818/* Override any GCC internal prototype to avoid an error.
8819 Use char because int might match the return type of a GCC
8820 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008821#ifdef __cplusplus
8822extern "C"
8823#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008824char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008825int
8826main ()
8827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008829 ;
8830 return 0;
8831}
8832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834 ac_cv_lib_intl_textdomain=yes
8835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838rm -f core conftest.err conftest.$ac_objext \
8839 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008840LIBS=$ac_check_lib_save_LIBS
8841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8843$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008847
Brett Cannonc6d936e2009-06-07 20:09:53 +00008848 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008849fi
8850
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008851
8852# checks for system dependent C++ extensions support
8853case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8855$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008857/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
Georg Brandl59e87bd2011-02-15 19:48:59 +00008859 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008860int
8861main ()
8862{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008863loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 ;
8865 return 0;
8866}
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008870
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Matthias Kloseb159a552010-04-25 21:00:44 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008877else
Matthias Kloseb159a552010-04-25 21:00:44 +00008878
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883rm -f core conftest.err conftest.$ac_objext \
8884 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008885 *) ;;
8886esac
8887
Guido van Rossum70c7f481998-03-26 18:44:10 +00008888# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8890$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008891if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008893else
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008895LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899/* Override any GCC internal prototype to avoid an error.
8900 Use char because int might match the return type of a GCC
8901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008902#ifdef __cplusplus
8903extern "C"
8904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008905char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ;
8911 return 0;
8912}
8913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008916else
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919rm -f core conftest.err conftest.$ac_objext \
8920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8924$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008925if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008926 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008928 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8930$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008931if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008933else
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008935LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939/* Override any GCC internal prototype to avoid an error.
8940 Use char because int might match the return type of a GCC
8941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942#ifdef __cplusplus
8943extern "C"
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ;
8951 return 0;
8952}
8953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008956else
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008959rm -f core conftest.err conftest.$ac_objext \
8960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8964$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008965if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008966 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008967fi
8968 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8971$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008974if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8977$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008978LIBS="$withval $LIBS"
8979
8980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983fi
8984
Guido van Rossum7f43da71994-08-01 12:15:30 +00008985
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008986if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008987 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8988set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8990$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008991if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008993else
8994 case $PKG_CONFIG in
8995 [\\/]* | ?:[\\/]*)
8996 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8997 ;;
8998 *)
8999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9000for as_dir in $PATH
9001do
9002 IFS=$as_save_IFS
9003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04009005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009006 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009008 break 2
9009 fi
9010done
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009012IFS=$as_save_IFS
9013
9014 ;;
9015esac
9016fi
9017PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9018if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9020$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009024fi
9025
9026
9027fi
9028if test -z "$ac_cv_path_PKG_CONFIG"; then
9029 ac_pt_PKG_CONFIG=$PKG_CONFIG
9030 # Extract the first word of "pkg-config", so it can be a program name with args.
9031set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9033$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009034if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009036else
9037 case $ac_pt_PKG_CONFIG in
9038 [\\/]* | ?:[\\/]*)
9039 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9040 ;;
9041 *)
9042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9043for as_dir in $PATH
9044do
9045 IFS=$as_save_IFS
9046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -04009048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009049 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009051 break 2
9052 fi
9053done
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009055IFS=$as_save_IFS
9056
9057 ;;
9058esac
9059fi
9060ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9061if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9063$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009064else
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009067fi
9068
9069 if test "x$ac_pt_PKG_CONFIG" = x; then
9070 PKG_CONFIG=""
9071 else
9072 case $cross_compiling:$ac_tool_warned in
9073yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009076ac_tool_warned=yes ;;
9077esac
9078 PKG_CONFIG=$ac_pt_PKG_CONFIG
9079 fi
9080else
9081 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9082fi
9083
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009084
9085# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9087$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009088
9089# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009091 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009092else
9093 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009094fi
9095
9096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9098$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009099
9100# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9102$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009103
9104# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009105if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009106 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009107else
9108 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009109fi
9110
9111
9112if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009113 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9114else
9115 LIBFFI_INCLUDEDIR=""
9116fi
9117
9118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9120$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009121
Stefan Krah60187b52012-03-23 19:06:27 +01009122# Check for use of the system libmpdec library
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9124$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9125
9126# Check whether --with-system_libmpdec was given.
9127if test "${with_system_libmpdec+set}" = set; then :
9128 withval=$with_system_libmpdec;
9129else
9130 with_system_libmpdec="no"
9131fi
9132
9133
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9135$as_echo "$with_system_libmpdec" >&6; }
9136
Benjamin Peterson076ed002010-10-31 17:11:02 +00009137# Check for support for loadable sqlite extensions
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9139$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9140# Check whether --enable-loadable-sqlite-extensions was given.
9141if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9142 enableval=$enable_loadable_sqlite_extensions;
9143else
9144 enable_loadable_sqlite_extensions="no"
9145fi
9146
9147
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9149$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9150
Matthias Klose55708cc2009-04-30 08:06:49 +00009151# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9153$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009154
9155# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009156if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009157 withval=$with_dbmliborder;
9158if test x$with_dbmliborder = xyes
9159then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009160as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009161else
9162 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9163 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009165 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009166 fi
9167 done
9168fi
9169fi
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9172$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009173
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009174# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009175
9176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9178$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009181if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182 withval=$with_signal_module;
9183fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009184
9185
9186if test -z "$with_signal_module"
9187then with_signal_module="yes"
9188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9190$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009191
9192if test "${with_signal_module}" = "yes"; then
9193 USE_SIGNAL_MODULE=""
9194 SIGNAL_OBJS=""
9195else
9196 USE_SIGNAL_MODULE="#"
9197 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9198fi
9199
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009200# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009202USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
9206# Templates for things AC_DEFINEd more than once.
9207# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009208
9209
Martin v. Löwis11437992002-04-12 09:54:03 +00009210
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9212$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216 withval=$with_threads;
9217fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009218
9219
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009220# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009223if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224 withval=$with_thread; with_threads=$with_thread
9225fi
9226
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009227
9228if test -z "$with_threads"
9229then with_threads="yes"
9230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9232$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009233
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009234
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009235if test "$with_threads" = "no"
9236then
9237 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009238elif test "$ac_cv_pthread_is_default" = yes
9239then
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009241
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009242 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009244
9245 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009247elif test "$ac_cv_kpthread" = "yes"
9248then
9249 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009250 if test "$ac_cv_cxx_thread" = "yes"; then
9251 CXX="$CXX -Kpthread"
9252 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009255 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009256 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009257elif test "$ac_cv_kthread" = "yes"
9258then
9259 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009260 if test "$ac_cv_cxx_thread" = "yes"; then
9261 CXX="$CXX -Kthread"
9262 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009264
9265 posix_threads=yes
9266 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009267elif test "$ac_cv_pthread" = "yes"
9268then
9269 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009270 if test "$ac_cv_cxx_thread" = "yes"; then
9271 CXX="$CXX -pthread"
9272 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009274
9275 posix_threads=yes
9276 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009277else
9278 if test ! -z "$with_threads" -a -d "$with_threads"
9279 then LDFLAGS="$LDFLAGS -L$with_threads"
9280 fi
9281 if test ! -z "$withval" -a -d "$withval"
9282 then LDFLAGS="$LDFLAGS -L$withval"
9283 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009284
9285 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009286 # define _POSIX_THREADS in unistd.h. Some apparently don't
9287 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9289$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009292
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009293#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009294#ifdef _POSIX_THREADS
9295yes
9296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
9298_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009301 unistd_defines_pthreads=yes
9302else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009303 unistd_defines_pthreads=no
9304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009305rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9308$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009311
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009312 # Just looking for pthread_create in libpthread is not enough:
9313 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9314 # So we really have to include pthread.h, and then link.
9315 _libs=$LIBS
9316 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9318$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009320/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009321#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009322
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009323void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009324int
9325main ()
9326{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009327
9328pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ;
9330 return 0;
9331}
9332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9336$as_echo "yes" >&6; }
9337 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009338
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009339 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009340 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009341else
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009343 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009344 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009345if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009347
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009348 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009349 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009350else
Guido van Rossumad678af1998-10-02 14:42:15 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9353$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009354if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009356else
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009358LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362/* Override any GCC internal prototype to avoid an error.
9363 Use char because int might match the return type of a GCC
9364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009365#ifdef __cplusplus
9366extern "C"
9367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009368char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ;
9374 return 0;
9375}
9376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009379else
Matthias Kloseb9621712010-04-24 17:59:49 +00009380 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009382rm -f core conftest.err conftest.$ac_objext \
9383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009384LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9387$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009388if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009391 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009392 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009393 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009394else
Greg Steinadf63d62000-07-05 10:38:09 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9397$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009398if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009400else
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009402LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406/* Override any GCC internal prototype to avoid an error.
9407 Use char because int might match the return type of a GCC
9408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409#ifdef __cplusplus
9410extern "C"
9411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009412char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009413int
9414main ()
9415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ;
9418 return 0;
9419}
9420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009423else
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009426rm -f core conftest.err conftest.$ac_objext \
9427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9431$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009432if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009434
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009435 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009436 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009437 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009438else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009439
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9441$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009442if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009444else
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009446LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450/* Override any GCC internal prototype to avoid an error.
9451 Use char because int might match the return type of a GCC
9452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009453#ifdef __cplusplus
9454extern "C"
9455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009456char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009457int
9458main ()
9459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 ;
9462 return 0;
9463}
9464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009470rm -f core conftest.err conftest.$ac_objext \
9471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009472LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9475$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009476if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009479 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009480 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009481 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009482else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9485$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009488else
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009490LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494/* Override any GCC internal prototype to avoid an error.
9495 Use char because int might match the return type of a GCC
9496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497#ifdef __cplusplus
9498extern "C"
9499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009500char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009501int
9502main ()
9503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ;
9506 return 0;
9507}
9508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009511else
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009514rm -f core conftest.err conftest.$ac_objext \
9515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009516LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9519$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009520if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009524 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009525 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009526else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009527
Martin v. Löwis130fb172001-07-19 11:00:41 +00009528 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009529fi
9530
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009532fi
9533
Guido van Rossum0be3e491997-05-22 20:33:33 +00009534fi
9535
Guido van Rossum49545951997-12-02 19:28:29 +00009536fi
9537
Guido van Rossumb93a8621998-05-07 13:27:32 +00009538fi
9539
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009541rm -f core conftest.err conftest.$ac_objext \
9542 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9545$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009546if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009548else
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009550LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554/* Override any GCC internal prototype to avoid an error.
9555 Use char because int might match the return type of a GCC
9556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557#ifdef __cplusplus
9558extern "C"
9559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009560char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
9563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ;
9566 return 0;
9567}
9568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009571else
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574rm -f core conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009576LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9579$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009580if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009582
Martin v. Löwis130fb172001-07-19 11:00:41 +00009583 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009584 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009585 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009586fi
9587
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009588
Neal Norwitza978ab02002-11-02 16:58:05 +00009589 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9591$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009592if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009594else
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009596LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600/* Override any GCC internal prototype to avoid an error.
9601 Use char because int might match the return type of a GCC
9602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009603#ifdef __cplusplus
9604extern "C"
9605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009606char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009607int
9608main ()
9609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ;
9612 return 0;
9613}
9614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009617else
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009620rm -f core conftest.err conftest.$ac_objext \
9621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9625$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009628
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009629 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009630 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009631 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009632fi
9633
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009634 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009636
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009637if test "$posix_threads" = "yes"; then
9638 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009641
9642 fi
9643
9644 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9645 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009646 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009647$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009648
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649 ;;
9650 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009651$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652
9653 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009654 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009656
9657 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009658 esac
9659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9661$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009662 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009664else
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666 ac_cv_pthread_system_supported=no
9667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670#include <pthread.h>
9671 void *foo(void *parm) {
9672 return NULL;
9673 }
9674 main() {
9675 pthread_attr_t attr;
9676 pthread_t id;
9677 if (pthread_attr_init(&attr)) exit(-1);
9678 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9679 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9680 exit(0);
9681 }
9682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009683if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684 ac_cv_pthread_system_supported=yes
9685else
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009690fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693fi
9694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9696$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697 if test "$ac_cv_pthread_system_supported" = "yes"; then
9698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700
9701 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702 for ac_func in pthread_sigmask
9703do :
9704 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009707#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009708_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009709 case $ac_sys_system in
9710 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711
Matthias Kloseb9621712010-04-24 17:59:49 +00009712$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009713
9714 ;;
9715 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716fi
9717done
9718
9719fi
9720
9721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009722# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Matthias Kloseb9621712010-04-24 17:59:49 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9725$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009727if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009732 ipv6=no
9733 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9735$as_echo "yes" >&6; }
9736 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737
9738 ipv6=yes
9739 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009747 ipv6=no
9748
9749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009752 /* AF_INET6 available check */
9753#include <sys/types.h>
9754#include <sys/socket.h>
9755main()
9756{
9757 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9758 exit(1);
9759 else
9760 exit(0);
9761}
9762
Martin v. Löwis11437992002-04-12 09:54:03 +00009763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009765
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9767$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009768 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009769
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009770else
Matthias Kloseb159a552010-04-25 21:00:44 +00009771
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009774 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779fi
9780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009782if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9784$as_echo_n "checking if RFC2553 API is available... " >&6; }
9785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009786/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009787
9788 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009789#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009793struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009794 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ;
9796 return 0;
9797}
Matthias Kloseb159a552010-04-25 21:00:44 +00009798
Martin v. Löwis11437992002-04-12 09:54:03 +00009799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009800if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009801
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009803$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009804 ipv6=yes
9805
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009806else
Matthias Kloseb159a552010-04-25 21:00:44 +00009807
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009809$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009810 ipv6=no
9811
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009814fi
9815
9816if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009818
9819fi
9820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821fi
9822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823
9824ipv6type=unknown
9825ipv6lib=none
9826ipv6trylibc=no
9827
9828if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9830$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009831 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9832 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009833 case $i in
9834 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838#include <netinet/in.h>
9839#ifdef IPV6_INRIA_VERSION
9840yes
9841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009845 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848
9849 ;;
9850 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009854#include <netinet/in.h>
9855#ifdef __KAME__
9856yes
9857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861 ipv6type=$i;
9862 ipv6lib=inet6
9863 ipv6libdir=/usr/local/v6/lib
9864 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009866rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867
9868 ;;
9869 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009873#include <features.h>
9874#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9875yes
9876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880 ipv6type=$i;
9881 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009883rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884
9885 ;;
9886 linux-inet6)
9887 if test -d /usr/inet6; then
9888 ipv6type=$i
9889 ipv6lib=inet6
9890 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009891 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892 fi
9893 ;;
9894 solaris)
9895 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009896 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897 ipv6type=$i
9898 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899 fi
9900 fi
9901 ;;
9902 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009904/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906#include <sys/param.h>
9907#ifdef _TOSHIBA_INET6
9908yes
9909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009910_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913 ipv6type=$i;
9914 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009915 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009917rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918
9919 ;;
9920 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924#include </usr/local/v6/include/sys/v6config.h>
9925#ifdef __V6D__
9926yes
9927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931 ipv6type=$i;
9932 ipv6lib=v6;
9933 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009934 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937
9938 ;;
9939 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943#include <sys/param.h>
9944#ifdef _ZETA_MINAMI_INET6
9945yes
9946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950 ipv6type=$i;
9951 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009952 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955
9956 ;;
9957 esac
9958 if test "$ipv6type" != "unknown"; then
9959 break
9960 fi
9961 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9963$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964fi
9965
9966if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9967 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9968 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9969 echo "using lib$ipv6lib"
9970 else
9971 if test $ipv6trylibc = "yes"; then
9972 echo "using libc"
9973 else
9974 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9975 echo "You need to fetch lib$ipv6lib.a from appropriate"
9976 echo 'ipv6 kit and compile beforehand.'
9977 exit 1
9978 fi
9979 fi
9980fi
9981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9983$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009985/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009986
9987 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009988int
9989main ()
9990{
9991FSIORefNum fRef = 0
9992 ;
9993 return 0;
9994}
Matthias Kloseb159a552010-04-25 21:00:44 +00009995
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009997if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009998
Matthias Kloseb159a552010-04-25 21:00:44 +00009999
Matthias Kloseb9621712010-04-24 17:59:49 +000010000$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10003$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010004
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010005else
Matthias Kloseb159a552010-04-25 21:00:44 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010009
10010fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10012
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010013# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10015$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019 withval=$with_doc_strings;
10020fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010021
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010022
10023if test -z "$with_doc_strings"
10024then with_doc_strings="yes"
10025fi
10026if test "$with_doc_strings" != "no"
10027then
10028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010030
10031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10033$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010034
Antoine Pitrou042b1282010-08-13 21:15:58 +000010035# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10037$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010042if test "$withval" != no
10043then
10044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10048$as_echo "yes" >&6; }
10049else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010051fi
10052else
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055fi
10056
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010057
10058# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10060$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 withval=$with_pymalloc;
10065fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010066
Neil Schemenauera35c6882001-02-27 04:45:05 +000010067
Neil Schemenauer16c22972002-03-22 15:34:49 +000010068if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010069then
10070 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010071fi
10072if test "$with_pymalloc" != "no"
10073then
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Matthias Kloseb9621712010-04-24 17:59:49 +000010075$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010076
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010077 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10080$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010081
Benjamin Peterson05159c42009-12-03 03:01:27 +000010082# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10084$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010085
10086# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010088 withval=$with_valgrind;
10089else
10090 with_valgrind=no
10091fi
10092
Matthias Kloseb9621712010-04-24 17:59:49 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10094$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010095if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 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 +020010097if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010098
Matthias Kloseb9621712010-04-24 17:59:49 +000010099$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010100
10101else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010102 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010103
10104fi
10105
10106
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010107 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010108fi
10109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010110# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010111
Guido van Rossum98935bf2001-09-05 19:13:16 +000010112DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010113
Guido van Rossume97ee181999-12-20 21:27:22 +000010114# the dlopen() function means we might want to use dynload_shlib.o. some
10115# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010116for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010117do :
10118 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010119if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010121#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010123
Guido van Rossume97ee181999-12-20 21:27:22 +000010124fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010125done
Guido van Rossume97ee181999-12-20 21:27:22 +000010126
Michael W. Hudson54241132001-12-07 15:38:26 +000010127
Guido van Rossume97ee181999-12-20 21:27:22 +000010128# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10129# loading of modules.
10130
Matthias Kloseb9621712010-04-24 17:59:49 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10132$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010133if test -z "$DYNLOADFILE"
10134then
10135 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010136 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10137 if test "$ac_cv_func_dlopen" = yes
10138 then DYNLOADFILE="dynload_shlib.o"
10139 else DYNLOADFILE="dynload_aix.o"
10140 fi
10141 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010142 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010143 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10144 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010145 *)
10146 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10147 # out any dynamic loading
10148 if test "$ac_cv_func_dlopen" = yes
10149 then DYNLOADFILE="dynload_shlib.o"
10150 else DYNLOADFILE="dynload_stub.o"
10151 fi
10152 ;;
10153 esac
10154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10156$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010157if test "$DYNLOADFILE" != "dynload_stub.o"
10158then
Martin v. Löwis11437992002-04-12 09:54:03 +000010159
Matthias Kloseb9621712010-04-24 17:59:49 +000010160$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010161
10162fi
10163
Neil Schemenauer4e425612001-06-19 15:44:15 +000010164# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10165
Michael W. Hudson54241132001-12-07 15:38:26 +000010166
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10168$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010169if test -z "$MACHDEP_OBJS"
10170then
Jack Jansene578a632001-08-15 01:27:14 +000010171 MACHDEP_OBJS=$extra_machdep_objs
10172else
10173 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010174fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010175if test -z "$MACHDEP_OBJS"; then
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10177$as_echo "none" >&6; }
10178else
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10180$as_echo "$MACHDEP_OBJS" >&6; }
10181fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010182
Guido van Rossum627b2d71993-12-24 10:39:16 +000010183# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010184for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010185 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010186 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010187 futimens futimes gai_strerror \
10188 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010189 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010190 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010191 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10192 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010193 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010194 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010195 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010196 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010197 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010198 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010199 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10200 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010201 sigaction sigaltstack siginterrupt sigpending sigrelse \
10202 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010203 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010204 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10205 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010206do :
10207 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10208ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010209if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010211#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010212_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010213
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214fi
10215done
10216
Michael W. Hudson54241132001-12-07 15:38:26 +000010217
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010218ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10219 #include <dirent.h>
10220"
10221if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10222
10223$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10224
10225fi
10226
10227
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010228# For some functions, having a definition is not sufficient, since
10229# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10231$as_echo_n "checking for chroot... " >&6; }
10232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010233/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010234#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010235int
10236main ()
10237{
10238void *x=chroot
10239 ;
10240 return 0;
10241}
10242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010246
Matthias Kloseb159a552010-04-25 21:00:44 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249else
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252
10253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10256$as_echo_n "checking for link... " >&6; }
10257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010259#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010260int
10261main ()
10262{
10263void *x=link
10264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010271
Matthias Kloseb159a552010-04-25 21:00:44 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277
10278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10281$as_echo_n "checking for symlink... " >&6; }
10282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010284#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010285int
10286main ()
10287{
10288void *x=symlink
10289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010296
Matthias Kloseb159a552010-04-25 21:00:44 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299else
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302
10303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10306$as_echo_n "checking for fchdir... " >&6; }
10307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010309#include <unistd.h>
10310int
10311main ()
10312{
10313void *x=fchdir
10314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010321
Matthias Kloseb159a552010-04-25 21:00:44 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324else
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327
10328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10331$as_echo_n "checking for fsync... " >&6; }
10332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010334#include <unistd.h>
10335int
10336main ()
10337{
10338void *x=fsync
10339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010344
Matthias Kloseb9621712010-04-24 17:59:49 +000010345$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010346
Matthias Kloseb159a552010-04-25 21:00:44 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349else
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352
10353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10356$as_echo_n "checking for fdatasync... " >&6; }
10357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010358/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010359#include <unistd.h>
10360int
10361main ()
10362{
10363void *x=fdatasync
10364 ;
10365 return 0;
10366}
10367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010371
Matthias Kloseb159a552010-04-25 21:00:44 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374else
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010377
10378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10381$as_echo_n "checking for epoll... " >&6; }
10382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010383/* end confdefs.h. */
10384#include <sys/epoll.h>
10385int
10386main ()
10387{
10388void *x=epoll_create
10389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010396
Matthias Kloseb159a552010-04-25 21:00:44 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010402
10403fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10406$as_echo_n "checking for epoll_create1... " >&6; }
10407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10408/* end confdefs.h. */
10409#include <sys/epoll.h>
10410int
10411main ()
10412{
10413void *x=epoll_create1
10414 ;
10415 return 0;
10416}
10417_ACEOF
10418if ac_fn_c_try_compile "$LINENO"; then :
10419
10420$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10421
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
10424else
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427
10428fi
10429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10431$as_echo_n "checking for kqueue... " >&6; }
10432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010433/* end confdefs.h. */
10434
10435#include <sys/types.h>
10436#include <sys/event.h>
10437
10438int
10439main ()
10440{
10441int x=kqueue()
10442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010447
Matthias Kloseb9621712010-04-24 17:59:49 +000010448$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010449
Matthias Kloseb159a552010-04-25 21:00:44 +000010450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010452else
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010455
10456fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010458# On some systems (eg. FreeBSD 5), we would find a definition of the
10459# functions ctermid_r, setgroups in the library, but no prototype
10460# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10461# address to avoid compiler warnings and potential miscompilations
10462# because of the missing prototypes.
10463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10465$as_echo_n "checking for ctermid_r... " >&6; }
10466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010467/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010468
Martin v. Löwisd5843682002-11-21 20:41:28 +000010469#include <stdio.h>
10470
Martin v. Löwisd5843682002-11-21 20:41:28 +000010471int
10472main ()
10473{
10474void* p = ctermid_r
10475 ;
10476 return 0;
10477}
10478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010482
Matthias Kloseb159a552010-04-25 21:00:44 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010484$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010485else
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010488
10489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10491
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10493$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010494if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010495 $as_echo_n "(cached) " >&6
10496else
10497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010499#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010500int
10501main ()
10502{
10503void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010504
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010509if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010510 ac_cv_flock_decl=yes
10511else
10512 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010513
10514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010516
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010517fi
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10519$as_echo "$ac_cv_flock_decl" >&6; }
10520if test "x${ac_cv_flock_decl}" = xyes; then
10521 for ac_func in flock
10522do :
10523 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010524if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010525 cat >>confdefs.h <<_ACEOF
10526#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010527_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010528
Antoine Pitroua3000072010-09-07 14:52:42 +000010529else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010531$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010532if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010533 $as_echo_n "(cached) " >&6
10534else
10535 ac_check_lib_save_LIBS=$LIBS
10536LIBS="-lbsd $LIBS"
10537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10538/* end confdefs.h. */
10539
10540/* Override any GCC internal prototype to avoid an error.
10541 Use char because int might match the return type of a GCC
10542 builtin and then its argument prototype would still apply. */
10543#ifdef __cplusplus
10544extern "C"
10545#endif
10546char flock ();
10547int
10548main ()
10549{
10550return flock ();
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555if ac_fn_c_try_link "$LINENO"; then :
10556 ac_cv_lib_bsd_flock=yes
10557else
10558 ac_cv_lib_bsd_flock=no
10559fi
10560rm -f core conftest.err conftest.$ac_objext \
10561 conftest$ac_exeext conftest.$ac_ext
10562LIBS=$ac_check_lib_save_LIBS
10563fi
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10565$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010566if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010567 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010568
10569
10570$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10571
10572
10573fi
10574
10575
10576fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010577done
10578
Antoine Pitroua3000072010-09-07 14:52:42 +000010579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10582$as_echo_n "checking for getpagesize... " >&6; }
10583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010585
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010586#include <unistd.h>
10587
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010588int
10589main ()
10590{
10591void* p = getpagesize
10592 ;
10593 return 0;
10594}
10595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010599
Matthias Kloseb159a552010-04-25 21:00:44 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010601$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010602else
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010605
10606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010608
Victor Stinner984890f2011-11-24 13:53:38 +010010609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10610$as_echo_n "checking for broken unsetenv... " >&6; }
10611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10612/* end confdefs.h. */
10613
10614#include <stdlib.h>
10615
10616int
10617main ()
10618{
10619int res = unsetenv("DUMMY")
10620 ;
10621 return 0;
10622}
10623_ACEOF
10624if ac_fn_c_try_compile "$LINENO"; then :
10625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626$as_echo "no" >&6; }
10627else
10628
10629$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10630
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10632$as_echo "yes" >&6; }
10633
10634fi
10635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10636
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637for ac_prog in true
10638do
10639 # Extract the first word of "$ac_prog", so it can be a program name with args.
10640set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010643if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645else
10646 if test -n "$TRUE"; then
10647 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10648else
10649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650for as_dir in $PATH
10651do
10652 IFS=$as_save_IFS
10653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 for ac_exec_ext in '' $ac_executable_extensions; do
Trent Nelsona4519a62012-10-16 11:51:08 -040010655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 $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 +000010658 break 2
10659 fi
10660done
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663
10664fi
10665fi
10666TRUE=$ac_cv_prog_TRUE
10667if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10669$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670else
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673fi
10674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676 test -n "$TRUE" && break
10677done
10678test -n "$TRUE" || TRUE="/bin/true"
10679
10680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10682$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010685else
10686 ac_check_lib_save_LIBS=$LIBS
10687LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691/* Override any GCC internal prototype to avoid an error.
10692 Use char because int might match the return type of a GCC
10693 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010694#ifdef __cplusplus
10695extern "C"
10696#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010697char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010698int
10699main ()
10700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010702 ;
10703 return 0;
10704}
10705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707 ac_cv_lib_c_inet_aton=yes
10708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711rm -f core conftest.err conftest.$ac_objext \
10712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010713LIBS=$ac_check_lib_save_LIBS
10714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10716$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010717if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010718 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10721$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010722if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724else
10725 ac_check_lib_save_LIBS=$LIBS
10726LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730/* Override any GCC internal prototype to avoid an error.
10731 Use char because int might match the return type of a GCC
10732 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010733#ifdef __cplusplus
10734extern "C"
10735#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010736char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737int
10738main ()
10739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746 ac_cv_lib_resolv_inet_aton=yes
10747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750rm -f core conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752LIBS=$ac_check_lib_save_LIBS
10753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10755$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010756if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757 cat >>confdefs.h <<_ACEOF
10758#define HAVE_LIBRESOLV 1
10759_ACEOF
10760
10761 LIBS="-lresolv $LIBS"
10762
10763fi
10764
10765
10766fi
10767
10768
Christian Heimesd0764e22007-12-04 15:00:33 +000010769# On Tru64, chflags seems to be present, but calling it will
10770# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10772$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010773if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010777 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010778else
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010780/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010781
Christian Heimesd0764e22007-12-04 15:00:33 +000010782#include <sys/stat.h>
10783#include <unistd.h>
10784int main(int argc, char*argv[])
10785{
10786 if(chflags(argv[0], 0) != 0)
10787 return 1;
10788 return 0;
10789}
Ned Deily3eb67d52011-06-28 00:00:28 -070010790
Christian Heimesd0764e22007-12-04 15:00:33 +000010791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010793 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010794else
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010799fi
10800
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010801
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10804$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010805if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010807if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010808 ac_cv_have_chflags="yes"
10809else
10810 ac_cv_have_chflags="no"
10811fi
10812
10813fi
10814if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010817
10818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10821$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010822if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010824else
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010826 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010829/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010830
Christian Heimesd0764e22007-12-04 15:00:33 +000010831#include <sys/stat.h>
10832#include <unistd.h>
10833int main(int argc, char*argv[])
10834{
10835 if(lchflags(argv[0], 0) != 0)
10836 return 1;
10837 return 0;
10838}
Ned Deily3eb67d52011-06-28 00:00:28 -070010839
Christian Heimesd0764e22007-12-04 15:00:33 +000010840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010842 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010843else
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010848fi
10849
10850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10853$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010854if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010856if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010857 ac_cv_have_lchflags="yes"
10858else
10859 ac_cv_have_lchflags="no"
10860fi
10861
10862fi
10863if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010866
10867fi
10868
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010869case $ac_sys_system/$ac_sys_release in
10870Darwin/*)
10871 _CUR_CFLAGS="${CFLAGS}"
10872 _CUR_LDFLAGS="${LDFLAGS}"
10873 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10874 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10875 ;;
10876esac
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10879$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010880if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010882else
10883 ac_check_lib_save_LIBS=$LIBS
10884LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010886/* end confdefs.h. */
10887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888/* Override any GCC internal prototype to avoid an error.
10889 Use char because int might match the return type of a GCC
10890 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010891#ifdef __cplusplus
10892extern "C"
10893#endif
10894char inflateCopy ();
10895int
10896main ()
10897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010899 ;
10900 return 0;
10901}
10902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010903if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010904 ac_cv_lib_z_inflateCopy=yes
10905else
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010908rm -f core conftest.err conftest.$ac_objext \
10909 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010910LIBS=$ac_check_lib_save_LIBS
10911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10913$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010914if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010917
10918fi
10919
10920
10921case $ac_sys_system/$ac_sys_release in
10922Darwin/*)
10923 CFLAGS="${_CUR_CFLAGS}"
10924 LDFLAGS="${_CUR_LDFLAGS}"
10925 ;;
10926esac
10927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10929$as_echo_n "checking for hstrerror... " >&6; }
10930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010932
Martin v. Löwise9416172003-05-03 10:12:45 +000010933#include <netdb.h>
10934
Martin v. Löwise9416172003-05-03 10:12:45 +000010935int
10936main ()
10937{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010938void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010939 ;
10940 return 0;
10941}
10942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010946
Matthias Kloseb159a552010-04-25 21:00:44 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10951$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010952
10953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010954rm -f core conftest.err conftest.$ac_objext \
10955 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10958$as_echo_n "checking for inet_aton... " >&6; }
10959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010961
Martin v. Löwis86d66262006-02-17 08:40:11 +000010962#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010963#include <sys/socket.h>
10964#include <netinet/in.h>
10965#include <arpa/inet.h>
10966
Martin v. Löwise9416172003-05-03 10:12:45 +000010967int
10968main ()
10969{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010970void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010978
Matthias Kloseb159a552010-04-25 21:00:44 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010981else
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010984
10985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986rm -f core conftest.err conftest.$ac_objext \
10987 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10990$as_echo_n "checking for inet_pton... " >&6; }
10991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010993
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010994#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010995#include <sys/socket.h>
10996#include <netinet/in.h>
10997#include <arpa/inet.h>
10998
Martin v. Löwise9416172003-05-03 10:12:45 +000010999int
11000main ()
11001{
11002void* p = inet_pton
11003 ;
11004 return 0;
11005}
11006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011010
Matthias Kloseb159a552010-04-25 21:00:44 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011016
11017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011019
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011020# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11022$as_echo_n "checking for setgroups... " >&6; }
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011025
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011026#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011027#ifdef HAVE_GRP_H
11028#include <grp.h>
11029#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011030
Martin v. Löwisd5843682002-11-21 20:41:28 +000011031int
11032main ()
11033{
11034void* p = setgroups
11035 ;
11036 return 0;
11037}
11038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011042
Matthias Kloseb159a552010-04-25 21:00:44 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011044$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011048
11049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011052# check for openpty and forkpty
11053
11054for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011055do :
11056 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011057if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011060_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11064$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011065if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011069LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073/* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011076#ifdef __cplusplus
11077extern "C"
11078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011079char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011093rm -f core conftest.err conftest.$ac_objext \
11094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011095LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11098$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011101 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11104$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011105if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011107else
11108 ac_check_lib_save_LIBS=$LIBS
11109LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011111/* end confdefs.h. */
11112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113/* Override any GCC internal prototype to avoid an error.
11114 Use char because int might match the return type of a GCC
11115 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116#ifdef __cplusplus
11117extern "C"
11118#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011119char openpty ();
11120int
11121main ()
11122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129 ac_cv_lib_bsd_openpty=yes
11130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011133rm -f core conftest.err conftest.$ac_objext \
11134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011135LIBS=$ac_check_lib_save_LIBS
11136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11138$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011139if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011141 LIBS="$LIBS -lbsd"
11142fi
11143
11144
11145fi
11146
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147
11148fi
11149done
11150
11151for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011152do :
11153 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011154if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011156#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011157_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011158
Fred Drake8cef4cf2000-06-28 16:40:38 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11161$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011162if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011164else
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011166LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170/* Override any GCC internal prototype to avoid an error.
11171 Use char because int might match the return type of a GCC
11172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011173#ifdef __cplusplus
11174extern "C"
11175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011176char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011177int
11178main ()
11179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011187else
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011190rm -f core conftest.err conftest.$ac_objext \
11191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011192LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11195$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011196if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011198 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11201$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011202if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011204else
11205 ac_check_lib_save_LIBS=$LIBS
11206LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011208/* end confdefs.h. */
11209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210/* Override any GCC internal prototype to avoid an error.
11211 Use char because int might match the return type of a GCC
11212 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011213#ifdef __cplusplus
11214extern "C"
11215#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011216char forkpty ();
11217int
11218main ()
11219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011221 ;
11222 return 0;
11223}
11224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011225if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011226 ac_cv_lib_bsd_forkpty=yes
11227else
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011230rm -f core conftest.err conftest.$ac_objext \
11231 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011232LIBS=$ac_check_lib_save_LIBS
11233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11235$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011236if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011238 LIBS="$LIBS -lbsd"
11239fi
11240
11241
11242fi
11243
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244
11245fi
11246done
11247
Jack Jansendd19cf82001-12-06 22:36:17 +000011248
Christian Heimesb186d002008-03-18 15:15:01 +000011249# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011250for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011251do :
11252 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011253if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011256_ACEOF
11257
11258fi
11259done
11260
11261
Michael W. Hudson54241132001-12-07 15:38:26 +000011262# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011264do :
11265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11266ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011267if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273done
11274
Michael W. Hudson54241132001-12-07 15:38:26 +000011275
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011276ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011277if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011278 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011279
Martin v. Löwis1142de32002-03-29 16:28:31 +000011280else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011282 *" dup2.$ac_objext "* ) ;;
11283 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011285esac
11286
Martin v. Löwis1142de32002-03-29 16:28:31 +000011287fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011288
11289ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011290if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011291 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11292
11293else
11294 case " $LIBOBJS " in
11295 *" getcwd.$ac_objext "* ) ;;
11296 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11297 ;;
11298esac
11299
11300fi
11301
11302ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011303if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011304 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11305
11306else
11307 case " $LIBOBJS " in
11308 *" strdup.$ac_objext "* ) ;;
11309 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11310 ;;
11311esac
11312
11313fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011314
11315
11316for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011317do :
11318 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011319if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011337
Guido van Rossum627b2d71993-12-24 10:39:16 +000011338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011340
Guido van Rossum627b2d71993-12-24 10:39:16 +000011341fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011342done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011343
Jack Jansen150753c2003-03-29 22:07:47 +000011344for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011345do :
11346 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011347if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011348 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011353#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011354int
11355main ()
11356{
11357setpgrp(0,0);
11358 ;
11359 return 0;
11360}
11361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011365
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011368
11369fi
11370done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011371
Thomas Wouters3a584202000-08-05 23:28:51 +000011372for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011373do :
11374 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011375if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011382int
11383main ()
11384{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ;
11387 return 0;
11388}
11389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390if ac_fn_c_try_compile "$LINENO"; then :
11391
Guido van Rossum627b2d71993-12-24 10:39:16 +000011392else
Skip Montanaro6dead952003-09-25 14:50:04 +000011393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011395
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Guido van Rossum627b2d71993-12-24 10:39:16 +000011397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011399
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011400fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011402
Michael W. Hudson54241132001-12-07 15:38:26 +000011403
Victor Stinnere0be4232011-10-25 13:06:09 +020011404for ac_func in clock_gettime
11405do :
11406 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11407if test "x$ac_cv_func_clock_gettime" = xyes; then :
11408 cat >>confdefs.h <<_ACEOF
11409#define HAVE_CLOCK_GETTIME 1
11410_ACEOF
11411
11412else
11413
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11415$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11416if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11417 $as_echo_n "(cached) " >&6
11418else
11419 ac_check_lib_save_LIBS=$LIBS
11420LIBS="-lrt $LIBS"
11421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h. */
11423
11424/* Override any GCC internal prototype to avoid an error.
11425 Use char because int might match the return type of a GCC
11426 builtin and then its argument prototype would still apply. */
11427#ifdef __cplusplus
11428extern "C"
11429#endif
11430char clock_gettime ();
11431int
11432main ()
11433{
11434return clock_gettime ();
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439if ac_fn_c_try_link "$LINENO"; then :
11440 ac_cv_lib_rt_clock_gettime=yes
11441else
11442 ac_cv_lib_rt_clock_gettime=no
11443fi
11444rm -f core conftest.err conftest.$ac_objext \
11445 conftest$ac_exeext conftest.$ac_ext
11446LIBS=$ac_check_lib_save_LIBS
11447fi
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11449$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11450if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11451
11452 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11453
11454
11455$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11456
11457
11458fi
11459
11460
11461fi
11462done
11463
11464
11465for ac_func in clock_getres
11466do :
11467 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11468if test "x$ac_cv_func_clock_getres" = xyes; then :
11469 cat >>confdefs.h <<_ACEOF
11470#define HAVE_CLOCK_GETRES 1
11471_ACEOF
11472
11473else
11474
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11476$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11477if ${ac_cv_lib_rt_clock_getres+:} false; then :
11478 $as_echo_n "(cached) " >&6
11479else
11480 ac_check_lib_save_LIBS=$LIBS
11481LIBS="-lrt $LIBS"
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11483/* end confdefs.h. */
11484
11485/* Override any GCC internal prototype to avoid an error.
11486 Use char because int might match the return type of a GCC
11487 builtin and then its argument prototype would still apply. */
11488#ifdef __cplusplus
11489extern "C"
11490#endif
11491char clock_getres ();
11492int
11493main ()
11494{
11495return clock_getres ();
11496 ;
11497 return 0;
11498}
11499_ACEOF
11500if ac_fn_c_try_link "$LINENO"; then :
11501 ac_cv_lib_rt_clock_getres=yes
11502else
11503 ac_cv_lib_rt_clock_getres=no
11504fi
11505rm -f core conftest.err conftest.$ac_objext \
11506 conftest$ac_exeext conftest.$ac_ext
11507LIBS=$ac_check_lib_save_LIBS
11508fi
11509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11510$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11511if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11512
11513 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11514
11515
11516fi
11517
11518
11519fi
11520done
11521
11522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11524$as_echo_n "checking for major... " >&6; }
11525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011526/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011527
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011528#if defined(MAJOR_IN_MKDEV)
11529#include <sys/mkdev.h>
11530#elif defined(MAJOR_IN_SYSMACROS)
11531#include <sys/sysmacros.h>
11532#else
11533#include <sys/types.h>
11534#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011535
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011536int
11537main ()
11538{
11539
11540 makedev(major(0),minor(0));
11541
11542 ;
11543 return 0;
11544}
11545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011547
11548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11552$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011553
11554else
Skip Montanaro6dead952003-09-25 14:50:04 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011558
11559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011560rm -f core conftest.err conftest.$ac_objext \
11561 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011562
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011563# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011564# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11566$as_echo_n "checking for getaddrinfo... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011569
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011570#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011571#include <sys/socket.h>
11572#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011573#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011574
Martin v. Löwis11437992002-04-12 09:54:03 +000011575int
11576main ()
11577{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011578getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ;
11580 return 0;
11581}
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011584 have_getaddrinfo=yes
11585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011588rm -f core conftest.err conftest.$ac_objext \
11589 conftest$ac_exeext conftest.$ac_ext
11590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11591$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011592if test $have_getaddrinfo = yes
11593then
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11595$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011596 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011600
11601if test "${enable_ipv6+set}" = set; then
11602 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11603else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011604 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011605fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011606else
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011609
11610#include <sys/types.h>
11611#include <netdb.h>
11612#include <string.h>
11613#include <sys/socket.h>
11614#include <netinet/in.h>
11615
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011616int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011617{
11618 int passive, gaierr, inet4 = 0, inet6 = 0;
11619 struct addrinfo hints, *ai, *aitop;
11620 char straddr[INET6_ADDRSTRLEN], strport[16];
11621
11622 for (passive = 0; passive <= 1; passive++) {
11623 memset(&hints, 0, sizeof(hints));
11624 hints.ai_family = AF_UNSPEC;
11625 hints.ai_flags = passive ? AI_PASSIVE : 0;
11626 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011627 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011628 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11629 (void)gai_strerror(gaierr);
11630 goto bad;
11631 }
11632 for (ai = aitop; ai; ai = ai->ai_next) {
11633 if (ai->ai_addr == NULL ||
11634 ai->ai_addrlen == 0 ||
11635 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11636 straddr, sizeof(straddr), strport, sizeof(strport),
11637 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11638 goto bad;
11639 }
11640 switch (ai->ai_family) {
11641 case AF_INET:
11642 if (strcmp(strport, "54321") != 0) {
11643 goto bad;
11644 }
11645 if (passive) {
11646 if (strcmp(straddr, "0.0.0.0") != 0) {
11647 goto bad;
11648 }
11649 } else {
11650 if (strcmp(straddr, "127.0.0.1") != 0) {
11651 goto bad;
11652 }
11653 }
11654 inet4++;
11655 break;
11656 case AF_INET6:
11657 if (strcmp(strport, "54321") != 0) {
11658 goto bad;
11659 }
11660 if (passive) {
11661 if (strcmp(straddr, "::") != 0) {
11662 goto bad;
11663 }
11664 } else {
11665 if (strcmp(straddr, "::1") != 0) {
11666 goto bad;
11667 }
11668 }
11669 inet6++;
11670 break;
11671 case AF_UNSPEC:
11672 goto bad;
11673 break;
11674 default:
11675 /* another family support? */
11676 break;
11677 }
11678 }
11679 }
11680
11681 if (!(inet4 == 0 || inet4 == 2))
11682 goto bad;
11683 if (!(inet6 == 0 || inet6 == 2))
11684 goto bad;
11685
11686 if (aitop)
11687 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011688 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011689
11690 bad:
11691 if (aitop)
11692 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011693 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011694}
11695
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011698 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011706fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11711$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11712
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011713if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011714then
11715 if test $ipv6 = yes
11716 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011717 echo 'Fatal: You must get working getaddrinfo() function.'
11718 echo ' or you can specify "--disable-ipv6"'.
11719 exit 1
11720 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011721else
Martin v. Löwis11437992002-04-12 09:54:03 +000011722
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011724
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011725fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011726
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011727for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011728do :
11729 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011733_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011735fi
11736done
11737
Michael W. Hudson54241132001-12-07 15:38:26 +000011738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011739# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11741$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747#include <sys/types.h>
11748#include <sys/time.h>
11749#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011750
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
11754if ((struct tm *) 0)
11755return 0;
11756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11768$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011769if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011772
11773fi
11774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11776$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779else
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782#include <sys/types.h>
11783#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
Martin v. Löwis11437992002-04-12 09:54:03 +000011785int
11786main ()
11787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788struct tm tm;
11789 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ;
11792 return 0;
11793}
11794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796 ac_cv_struct_tm=time.h
11797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11803$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011804if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011805
Matthias Kloseb9621712010-04-24 17:59:49 +000011806$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807
11808fi
11809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810ac_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 +000011811#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813"
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
11816cat >>confdefs.h <<_ACEOF
11817#define HAVE_STRUCT_TM_TM_ZONE 1
11818_ACEOF
11819
11820
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011821fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826
11827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11829"
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834fi
11835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838_ACEOF
11839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11841$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011842if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011846/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848#if !HAVE_DECL_TZNAME
11849extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Martin v. Löwis11437992002-04-12 09:54:03 +000011852int
11853main ()
11854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ;
11857 return 0;
11858}
11859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861 ac_cv_var_tzname=yes
11862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011865rm -f core conftest.err conftest.$ac_objext \
11866 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11869$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011870 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874 fi
11875fi
11876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877ac_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 +020011878if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011879
11880cat >>confdefs.h <<_ACEOF
11881#define HAVE_STRUCT_STAT_ST_RDEV 1
11882_ACEOF
11883
11884
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011885fi
11886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887ac_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 +020011888if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011889
Martin v. Löwis11437992002-04-12 09:54:03 +000011890cat >>confdefs.h <<_ACEOF
11891#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11892_ACEOF
11893
11894
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011895fi
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897ac_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 +020011898if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011899
11900cat >>confdefs.h <<_ACEOF
11901#define HAVE_STRUCT_STAT_ST_FLAGS 1
11902_ACEOF
11903
11904
11905fi
11906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907ac_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 +020011908if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011909
11910cat >>confdefs.h <<_ACEOF
11911#define HAVE_STRUCT_STAT_ST_GEN 1
11912_ACEOF
11913
11914
11915fi
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917ac_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 +020011918if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011919
11920cat >>confdefs.h <<_ACEOF
11921#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11922_ACEOF
11923
11924
11925fi
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927ac_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 +020011928if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930cat >>confdefs.h <<_ACEOF
11931#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11932_ACEOF
11933
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011936
11937else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011938 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011939 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011940 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11941 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011942esac
11943
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011944fi
11945
Michael W. Hudson54241132001-12-07 15:38:26 +000011946
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
Matthias Kloseb9621712010-04-24 17:59:49 +000011948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11949$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011950if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011952else
Matthias Kloseb159a552010-04-25 21:00:44 +000011953
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011956#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011957int
11958main ()
11959{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011960return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 ;
11962 return 0;
11963}
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011966 ac_cv_header_time_altzone=yes
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011972fi
11973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11975$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011976if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011979
11980fi
11981
Guido van Rossumda88dad1995-01-26 00:46:29 +000011982was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11984$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011986/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011987
11988#include <sys/types.h>
11989#include <sys/select.h>
11990#include <sys/time.h>
11991
Martin v. Löwis11437992002-04-12 09:54:03 +000011992int
11993main ()
11994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995;
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ;
11997 return 0;
11998}
11999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012004
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012005 was_it_defined=yes
12006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12010$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12013$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012016else
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012019#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012020int
12021main ()
12022{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012023struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029 ac_cv_struct_addrinfo=yes
12030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12034fi
12035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12037$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012038if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012041
12042fi
12043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12045$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012050/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012051
12052# include <sys/types.h>
12053# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012054int
12055main ()
12056{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012057struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ;
12059 return 0;
12060}
12061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012063 ac_cv_struct_sockaddr_storage=yes
12064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12068fi
12069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12071$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075
12076fi
12077
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12081$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012082if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012087$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012088int
12089main ()
12090{
12091static int test_array [1 - 2 * !(((char) -1) < 0)];
Trent Nelsona4519a62012-10-16 11:51:08 -040012092test_array [0] = 0;
12093return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
12095 ;
12096 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012097}
Martin v. Löwis11437992002-04-12 09:54:03 +000012098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012099if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012100 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12107$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110
12111fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12114$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012115if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
Trent Nelsona4519a62012-10-16 11:51:08 -040012124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125#ifndef __cplusplus
Trent Nelsona4519a62012-10-16 11:51:08 -040012126 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 typedef int charset[2];
Trent Nelsona4519a62012-10-16 11:51:08 -040012128 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130 char const *const *pcpcc;
12131 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 /* NEC SVR4.0.2 mips cc rejects this. */
12133 struct point {int x, y;};
12134 static struct point const zero = {0,0};
12135 /* AIX XL C 1.02.0.0 rejects this.
12136 It does not let you subtract one const X* pointer from another in
12137 an arm of an if-expression whose if-part is not a constant
12138 expression */
12139 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142 ++pcpcc;
12143 ppc = (char**) pcpcc;
12144 pcpcc = (char const *const *) ppc;
Trent Nelsona4519a62012-10-16 11:51:08 -040012145 { /* SCO 3.2v4 cc rejects this sort of thing. */
12146 char tx;
12147 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 }
12153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12154 int x[] = {25, 17};
12155 const int *foo = &x[0];
12156 ++foo;
12157 }
12158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12159 typedef const int *iptr;
12160 iptr p = 0;
12161 ++p;
12162 }
Trent Nelsona4519a62012-10-16 11:51:08 -040012163 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Trent Nelsona4519a62012-10-16 11:51:08 -040012165 struct s { int j; const int *ap[3]; } bx;
12166 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 }
12168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12169 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ;
12176 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012177}
Martin v. Löwis11437992002-04-12 09:54:03 +000012178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012179if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012180 ac_cv_c_const=yes
12181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12187$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191
12192fi
12193
Michael W. Hudson54241132001-12-07 15:38:26 +000012194
Guido van Rossumda88dad1995-01-26 00:46:29 +000012195works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12197$as_echo_n "checking for working volatile... " >&6; }
12198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012199/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200
Martin v. Löwis11437992002-04-12 09:54:03 +000012201int
12202main ()
12203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 ;
12206 return 0;
12207}
12208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012210 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012211else
Skip Montanaro6dead952003-09-25 14:50:04 +000012212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012215
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12219$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012220
Guido van Rossumda88dad1995-01-26 00:46:29 +000012221works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12223$as_echo_n "checking for working signed char... " >&6; }
12224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012225/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227int
12228main ()
12229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 ;
12232 return 0;
12233}
12234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012236 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012237else
Skip Montanaro6dead952003-09-25 14:50:04 +000012238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012240
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012241
Guido van Rossum7f43da71994-08-01 12:15:30 +000012242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12245$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012246
Guido van Rossumda88dad1995-01-26 00:46:29 +000012247have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12249$as_echo_n "checking for prototypes... " >&6; }
12250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012252int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Matthias Kloseb159a552010-04-25 21:00:44 +000012265 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12269$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270
Guido van Rossumda88dad1995-01-26 00:46:29 +000012271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12273$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012276
12277#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012278int foo(int x, ...) {
12279 va_list va;
12280 va_start(va, x);
12281 va_arg(va, int);
12282 va_arg(va, char *);
12283 va_arg(va, double);
12284 return 0;
12285}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Guido van Rossum90eea071996-08-30 20:58:57 +000012290return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
12297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012300 works=yes
12301
Guido van Rossum627b2d71993-12-24 10:39:16 +000012302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12305$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306
Martin v. Löwisd6320502004-08-12 13:45:08 +000012307# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12309$as_echo_n "checking for socketpair... " >&6; }
12310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012311/* end confdefs.h. */
12312
12313#include <sys/types.h>
12314#include <sys/socket.h>
12315
12316int
12317main ()
12318{
12319void *x=socketpair
12320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012327
Matthias Kloseb159a552010-04-25 21:00:44 +000012328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12332$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012333
12334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012337# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12339$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012341/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012342#include <sys/types.h>
12343#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012347struct sockaddr x;
12348x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12355$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358
12359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012362
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365
Guido van Rossumda88dad1995-01-26 00:46:29 +000012366va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12368$as_echo_n "checking whether va_list is an array... " >&6; }
12369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371
12372#ifdef HAVE_STDARG_PROTOTYPES
12373#include <stdarg.h>
12374#else
12375#include <varargs.h>
12376#endif
12377
Martin v. Löwis11437992002-04-12 09:54:03 +000012378int
12379main ()
12380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012381va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 ;
12383 return 0;
12384}
12385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012386if ac_fn_c_try_compile "$LINENO"; then :
12387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012388else
Skip Montanaro6dead952003-09-25 14:50:04 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Guido van Rossumda88dad1995-01-26 00:46:29 +000012393 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12398$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012400# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
12402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012404if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12409$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012410 OLD_CFLAGS=$CFLAGS
12411 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012414
12415# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012420
12421 char *name;
12422 struct hostent *he, *res;
12423 char buffer[2048];
12424 int buflen = 2048;
12425 int h_errnop;
12426
12427 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
12429 ;
12430 return 0;
12431}
12432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012436
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12441$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012443else
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12446$as_echo "no" >&6; }
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12448$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012452# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012457
12458 char *name;
12459 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012460 char buffer[2048];
12461 int buflen = 2048;
12462 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012463
Matthias Kloseb159a552010-04-25 21:00:44 +000012464 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
12466 ;
12467 return 0;
12468}
12469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Matthias Kloseb159a552010-04-25 21:00:44 +000012475$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12478$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012480else
Skip Montanaro6dead952003-09-25 14:50:04 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12485$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12487/* end confdefs.h. */
12488
12489# include <netdb.h>
12490
12491int
12492main ()
12493{
12494
12495 char *name;
12496 struct hostent *he;
12497 struct hostent_data data;
12498
12499 (void) gethostbyname_r(name, he, &data);
12500
12501 ;
12502 return 0;
12503}
12504_ACEOF
12505if ac_fn_c_try_compile "$LINENO"; then :
12506
12507 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12508
12509
12510$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12511
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12513$as_echo "yes" >&6; }
12514
12515else
12516
12517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012528 CFLAGS=$OLD_CFLAGS
12529
12530else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 for ac_func in gethostbyname
12533do :
12534 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012535if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012538_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012540fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012541done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012542
Michael W. Hudson54241132001-12-07 15:38:26 +000012543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544fi
12545
Michael W. Hudson54241132001-12-07 15:38:26 +000012546
12547
12548
12549
12550
12551
Guido van Rossum627b2d71993-12-24 10:39:16 +000012552# checks for system services
12553# (none yet)
12554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012556ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012557if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012558
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12561$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012562if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564else
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012566LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570/* Override any GCC internal prototype to avoid an error.
12571 Use char because int might match the return type of a GCC
12572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012573#ifdef __cplusplus
12574extern "C"
12575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012576char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012577int
12578main ()
12579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 ;
12582 return 0;
12583}
12584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012590rm -f core conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12595$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012596if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 cat >>confdefs.h <<_ACEOF
12598#define HAVE_LIBIEEE 1
12599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012601 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602
Guido van Rossum627b2d71993-12-24 10:39:16 +000012603fi
12604
Michael W. Hudson54241132001-12-07 15:38:26 +000012605
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012606fi
12607
Michael W. Hudson54241132001-12-07 15:38:26 +000012608
Guido van Rossum7f253911997-05-09 02:42:48 +000012609# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12611$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012616if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012617then
12618
Matthias Kloseb9621712010-04-24 17:59:49 +000012619$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12622$as_echo "yes" >&6; }
12623else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12624$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012625fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12628$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629fi
12630
Guido van Rossum7f253911997-05-09 02:42:48 +000012631
Guido van Rossum7f43da71994-08-01 12:15:30 +000012632# check for --with-libm=...
12633
Guido van Rossum563e7081996-09-10 18:20:48 +000012634case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012635Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012636*) LIBM=-lm
12637esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12639$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012642if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012644if test "$withval" = no
12645then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12647$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012649then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12651$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012652else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012653fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12656$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657fi
12658
Guido van Rossum7f43da71994-08-01 12:15:30 +000012659
12660# check for --with-libc=...
12661
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12663$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012668if test "$withval" = no
12669then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12671$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012672elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012673then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12675$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012676else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012677fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12680$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681fi
12682
Guido van Rossum7f43da71994-08-01 12:15:30 +000012683
Stefan Krah1919b7e2012-03-21 18:25:23 +010012684# **************************************
12685# * Check for gcc x64 inline assembler *
12686# **************************************
12687
12688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12689$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691/* end confdefs.h. */
12692
12693int
12694main ()
12695{
12696
12697 __asm__ __volatile__ ("movq %rcx, %rax");
12698
12699 ;
12700 return 0;
12701}
12702_ACEOF
12703if ac_fn_c_try_compile "$LINENO"; then :
12704 have_gcc_asm_for_x64=yes
12705else
12706 have_gcc_asm_for_x64=no
12707fi
12708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12710$as_echo "$have_gcc_asm_for_x64" >&6; }
12711if test "$have_gcc_asm_for_x64" = yes
12712then
12713
12714$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12715
12716fi
12717
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012718# **************************************************
12719# * Check for various properties of floating point *
12720# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12723$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012726else
12727
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012729 ac_cv_little_endian_double=no
12730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012732/* end confdefs.h. */
12733
12734#include <string.h>
12735int main() {
12736 double x = 9006104071832581.0;
12737 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12738 return 0;
12739 else
12740 return 1;
12741}
12742
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012745 ac_cv_little_endian_double=yes
12746else
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012751fi
12752
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012753fi
12754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12756$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012757if test "$ac_cv_little_endian_double" = yes
12758then
12759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012761
12762fi
12763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12765$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012766if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012768else
12769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771 ac_cv_big_endian_double=no
12772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774/* end confdefs.h. */
12775
12776#include <string.h>
12777int main() {
12778 double x = 9006104071832581.0;
12779 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12780 return 0;
12781 else
12782 return 1;
12783}
12784
12785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012787 ac_cv_big_endian_double=yes
12788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793fi
12794
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795fi
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12798$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012799if test "$ac_cv_big_endian_double" = yes
12800then
12801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012803
12804fi
12805
12806# Some ARM platforms use a mixed-endian representation for doubles.
12807# While Python doesn't currently have full support for these platforms
12808# (see e.g., issue 1762561), we can at least make sure that float <-> string
12809# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12811$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012812if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012814else
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817 ac_cv_mixed_endian_double=no
12818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012820/* end confdefs.h. */
12821
12822#include <string.h>
12823int main() {
12824 double x = 9006104071832581.0;
12825 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12826 return 0;
12827 else
12828 return 1;
12829}
12830
12831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833 ac_cv_mixed_endian_double=yes
12834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839fi
12840
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841fi
12842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12844$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845if test "$ac_cv_mixed_endian_double" = yes
12846then
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849
12850fi
12851
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012852# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012853# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012854# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012855# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012856# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012857# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012858
12859# This inline assembler syntax may also work for suncc and icc,
12860# so we try it on all platforms.
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12863$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865/* end confdefs.h. */
12866
12867int
12868main ()
12869{
12870
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012871 unsigned short cw;
12872 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12873 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012874
12875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012880 have_gcc_asm_for_x87=yes
12881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012883fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12886$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012887if test "$have_gcc_asm_for_x87" = yes
12888then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012891
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012894# Detect whether system arithmetic is subject to x87-style double
12895# rounding issues. The result of this test has little meaning on non
12896# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12897# mode is round-to-nearest and double rounding issues are present, and
12898# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12900$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012901# $BASECFLAGS may affect the result
12902ac_save_cc="$CC"
12903CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012905 ac_cv_x87_double_rounding=no
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012908/* end confdefs.h. */
12909
12910#include <stdlib.h>
12911#include <math.h>
12912int main() {
12913 volatile double x, y, z;
12914 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12915 x = 0.99999999999999989; /* 1-2**-53 */
12916 y = 1./x;
12917 if (y != 1.)
12918 exit(0);
12919 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12920 x = 1e16;
12921 y = 2.99999;
12922 z = x + y;
12923 if (z != 1e16+4.)
12924 exit(0);
12925 /* both tests show evidence of double rounding */
12926 exit(1);
12927}
12928
12929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012931 ac_cv_x87_double_rounding=no
12932else
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012937fi
12938
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012939CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12941$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012942if test "$ac_cv_x87_double_rounding" = yes
12943then
12944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012946
12947fi
12948
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012949# ************************************
12950# * Check for mathematical functions *
12951# ************************************
12952
12953LIBS_SAVE=$LIBS
12954LIBS="$LIBS $LIBM"
12955
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012956for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12957do :
12958 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12959ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012960if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012961 cat >>confdefs.h <<_ACEOF
12962#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12963_ACEOF
12964
12965fi
12966done
12967
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012968for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012969do :
12970 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12971ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012972if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012973 cat >>confdefs.h <<_ACEOF
12974#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12975_ACEOF
12976
12977fi
12978done
12979
12980ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12981"
Victor Stinnere0be4232011-10-25 13:06:09 +020012982if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012983 ac_have_decl=1
12984else
12985 ac_have_decl=0
12986fi
12987
12988cat >>confdefs.h <<_ACEOF
12989#define HAVE_DECL_ISINF $ac_have_decl
12990_ACEOF
12991ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12992"
Victor Stinnere0be4232011-10-25 13:06:09 +020012993if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012994 ac_have_decl=1
12995else
12996 ac_have_decl=0
12997fi
12998
12999cat >>confdefs.h <<_ACEOF
13000#define HAVE_DECL_ISNAN $ac_have_decl
13001_ACEOF
13002ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13003"
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013005 ac_have_decl=1
13006else
13007 ac_have_decl=0
13008fi
13009
13010cat >>confdefs.h <<_ACEOF
13011#define HAVE_DECL_ISFINITE $ac_have_decl
13012_ACEOF
13013
13014
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013015# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13016# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13018$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013021else
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013024 ac_cv_tanh_preserves_zero_sign=no
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013027/* end confdefs.h. */
13028
13029#include <math.h>
13030#include <stdlib.h>
13031int main() {
13032 /* return 0 if either negative zeros don't exist
13033 on this platform or if negative zeros exist
13034 and tanh(-0.) == -0. */
13035 if (atan2(0., -1.) == atan2(-0., -1.) ||
13036 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13037 else exit(1);
13038}
13039
13040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013042 ac_cv_tanh_preserves_zero_sign=yes
13043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013048fi
13049
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013050fi
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13053$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013054if test "$ac_cv_tanh_preserves_zero_sign" = yes
13055then
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013058
13059fi
13060
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013061if test "$ac_cv_func_log1p" = yes
13062then
13063 # On some versions of AIX, log1p(-0.) returns 0. instead of
13064 # -0. See issue #9920.
13065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13066$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013067 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013068 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013069else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013070
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013071 if test "$cross_compiling" = yes; then :
13072 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013073else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013076
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013077 #include <math.h>
13078 #include <stdlib.h>
13079 int main() {
13080 /* Fail if the signs of log1p(-0.) and -0. can be
13081 distinguished. */
13082 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13083 return 0;
13084 else
13085 return 1;
13086 }
13087
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013088_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013089if ac_fn_c_try_run "$LINENO"; then :
13090 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013091else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013092 ac_cv_log1p_drops_zero_sign=yes
13093fi
13094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013096fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013097
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013098fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013099
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13101$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13102fi
13103if test "$ac_cv_log1p_drops_zero_sign" = yes
13104then
13105
13106$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13107
13108fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013109
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013110LIBS=$LIBS_SAVE
13111
Mark Dickinsona614f042009-11-28 12:48:43 +000013112# For multiprocessing module, check that sem_open
13113# actually works. For FreeBSD versions <= 7.2,
13114# the kernel module that provides POSIX semaphores
13115# isn't loaded by default, so an attempt to call
13116# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13118$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013119if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013123 ac_cv_posix_semaphores_enabled=yes
13124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013126/* end confdefs.h. */
13127
13128#include <unistd.h>
13129#include <fcntl.h>
13130#include <stdio.h>
13131#include <semaphore.h>
13132#include <sys/stat.h>
13133
13134int main(void) {
13135 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13136 if (a == SEM_FAILED) {
13137 perror("sem_open");
13138 return 1;
13139 }
13140 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013141 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013142 return 0;
13143}
13144
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013147 ac_cv_posix_semaphores_enabled=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013153fi
13154
13155
Mark Dickinsona614f042009-11-28 12:48:43 +000013156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13159$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013160if test $ac_cv_posix_semaphores_enabled = no
13161then
13162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013164
13165fi
13166
Mark Dickinson10683072009-04-18 21:18:19 +000013167# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13169$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013170if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013174 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013177/* end confdefs.h. */
13178
13179#include <unistd.h>
13180#include <fcntl.h>
13181#include <stdio.h>
13182#include <semaphore.h>
13183#include <sys/stat.h>
13184
13185int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013186 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013187 int count;
13188 int res;
13189 if(a==SEM_FAILED){
13190 perror("sem_open");
13191 return 1;
13192
13193 }
13194 res = sem_getvalue(a, &count);
13195 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013196 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013197 return res==-1 ? 1 : 0;
13198}
13199
Mark Dickinson10683072009-04-18 21:18:19 +000013200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013208fi
13209
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013210
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013211fi
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13214$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215if test $ac_cv_broken_sem_getvalue = yes
13216then
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013219
13220fi
13221
Mark Dickinsonbd792642009-03-18 20:06:12 +000013222# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13224$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013225# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013227 enableval=$enable_big_digits; case $enable_big_digits in
13228yes)
13229 enable_big_digits=30 ;;
13230no)
13231 enable_big_digits=15 ;;
1323215|30)
13233 ;;
13234*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013235 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 +000013236esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13238$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013239
13240cat >>confdefs.h <<_ACEOF
13241#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13242_ACEOF
13243
13244
13245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13247$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013248fi
13249
13250
Guido van Rossumef2255b2000-03-10 22:30:29 +000013251# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013252ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013253if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
13255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013258 wchar_h="yes"
13259
Guido van Rossumef2255b2000-03-10 22:30:29 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013262
13263fi
13264
Michael W. Hudson54241132001-12-07 15:38:26 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013267# determine wchar_t size
13268if test "$wchar_h" = yes
13269then
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13273# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13275$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013276if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13280"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
Martin v. Löwis11437992002-04-12 09:54:03 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 if test "$ac_cv_type_wchar_t" = yes; then
13284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013286as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013287See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288 else
13289 ac_cv_sizeof_wchar_t=0
13290 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013292
Martin v. Löwis11437992002-04-12 09:54:03 +000013293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13295$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013296
13297
13298
Martin v. Löwis11437992002-04-12 09:54:03 +000013299cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013300#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013301_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013302
Michael W. Hudson54241132001-12-07 15:38:26 +000013303
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013304fi
13305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13307$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013308have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013311
13312#include <tcl.h>
13313#if TCL_UTF_MAX != 6
13314# error "NOT UCS4_TCL"
13315#endif
13316int
13317main ()
13318{
13319
13320 ;
13321 return 0;
13322}
13323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013325
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013328
13329 have_ucs4_tcl=yes
13330
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13334$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013335
Skip Montanaro6dead952003-09-25 14:50:04 +000013336# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013337if test "$wchar_h" = yes
13338then
13339 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13341$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013342 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013344else
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013347 ac_cv_wchar_t_signed=yes
13348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013351
13352 #include <wchar.h>
13353 int main()
13354 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013355 /* Success: exit code 0 */
13356 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013357 }
13358
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013361 ac_cv_wchar_t_signed=yes
13362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013367fi
13368
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013369fi
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13372$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373fi
13374
Georg Brandl52d168a2008-01-07 18:10:24 +000013375# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013376if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013377 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013378then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013379 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Georg Brandl52d168a2008-01-07 18:10:24 +000013383else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013384 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013385fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13387$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013388
13389# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13391$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013392if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_cv_c_bigendian=unknown
13396 # See if we're dealing with a universal compiler.
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398/* end confdefs.h. */
13399#ifndef __APPLE_CC__
13400 not a universal capable compiler
13401 #endif
13402 typedef int dummy;
13403
Skip Montanaro6dead952003-09-25 14:50:04 +000013404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_compile "$LINENO"; then :
13406
13407 # Check for potential -arch flags. It is not universal unless
13408 # there are at least two -arch flags with different values.
13409 ac_arch=
13410 ac_prev=
13411 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13412 if test -n "$ac_prev"; then
13413 case $ac_word in
13414 i?86 | x86_64 | ppc | ppc64)
13415 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13416 ac_arch=$ac_word
13417 else
13418 ac_cv_c_bigendian=universal
13419 break
13420 fi
13421 ;;
13422 esac
13423 ac_prev=
13424 elif test "x$ac_word" = "x-arch"; then
13425 ac_prev=arch
13426 fi
13427 done
13428fi
13429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13430 if test $ac_cv_c_bigendian = unknown; then
13431 # See if sys/param.h defines the BYTE_ORDER macro.
13432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013433/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013434#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
Matthias Kloseb9621712010-04-24 17:59:49 +000013440#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13441 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13442 && LITTLE_ENDIAN)
13443 bogus endian macros
13444 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
13446 ;
13447 return 0;
13448}
13449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013451 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013453/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013454#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457int
13458main ()
13459{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013460#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 not big endian
13462 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
13464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013469 ac_cv_c_bigendian=yes
13470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013474fi
13475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13476 fi
13477 if test $ac_cv_c_bigendian = unknown; then
13478 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013481#include <limits.h>
13482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483int
13484main ()
13485{
Matthias Kloseb9621712010-04-24 17:59:49 +000013486#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13487 bogus endian macros
13488 #endif
13489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ;
13491 return 0;
13492}
13493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_compile "$LINENO"; then :
13495 # It does; now see whether it defined to _BIG_ENDIAN or not.
13496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497/* end confdefs.h. */
13498#include <limits.h>
13499
13500int
13501main ()
13502{
13503#ifndef _BIG_ENDIAN
13504 not big endian
13505 #endif
13506
13507 ;
13508 return 0;
13509}
13510_ACEOF
13511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13517fi
13518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13519 fi
13520 if test $ac_cv_c_bigendian = unknown; then
13521 # Compile a test program.
13522 if test "$cross_compiling" = yes; then :
13523 # Try to guess by grepping values from an object file.
13524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13525/* end confdefs.h. */
13526short int ascii_mm[] =
13527 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13528 short int ascii_ii[] =
13529 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13530 int use_ascii (int i) {
13531 return ascii_mm[i] + ascii_ii[i];
13532 }
13533 short int ebcdic_ii[] =
13534 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13535 short int ebcdic_mm[] =
13536 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13537 int use_ebcdic (int i) {
13538 return ebcdic_mm[i] + ebcdic_ii[i];
13539 }
13540 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542int
13543main ()
13544{
13545return use_ascii (foo) == use_ebcdic (foo);
13546 ;
13547 return 0;
13548}
13549_ACEOF
13550if ac_fn_c_try_compile "$LINENO"; then :
13551 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13552 ac_cv_c_bigendian=yes
13553 fi
13554 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13555 if test "$ac_cv_c_bigendian" = unknown; then
13556 ac_cv_c_bigendian=no
13557 else
13558 # finding both strings is unlikely to happen, but who knows?
13559 ac_cv_c_bigendian=unknown
13560 fi
13561 fi
13562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013566/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013568int
13569main ()
13570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 /* Are we little or big endian? From Harbison&Steele. */
13573 union
13574 {
13575 long int l;
13576 char c[sizeof (long int)];
13577 } u;
13578 u.l = 1;
13579 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580
13581 ;
13582 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013583}
Martin v. Löwis11437992002-04-12 09:54:03 +000013584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013586 ac_cv_c_bigendian=no
13587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13597$as_echo "$ac_cv_c_bigendian" >&6; }
13598 case $ac_cv_c_bigendian in #(
13599 yes)
13600 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13601;; #(
13602 no)
13603 ;; #(
13604 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 ;; #(
13609 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013610 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013611 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013613
Michael W. Hudson54241132001-12-07 15:38:26 +000013614
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013615# ABI version string for Python extension modules. This appears between the
13616# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13617# from the following attributes which affect the ABI of this Python build (in
13618# this order):
13619#
13620# * The Python implementation (always 'cpython-' for us)
13621# * The major and minor version numbers
13622# * --with-pydebug (adds a 'd')
13623# * --with-pymalloc (adds a 'm')
13624# * --with-wide-unicode (adds a 'u')
13625#
13626# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013627# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13628# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013629
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13631$as_echo_n "checking ABIFLAGS... " >&6; }
13632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13633$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13635$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013636SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13638$as_echo "$SOABI" >&6; }
13639
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13641$as_echo_n "checking LDVERSION... " >&6; }
13642LDVERSION='$(VERSION)$(ABIFLAGS)'
13643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13644$as_echo "$LDVERSION" >&6; }
13645
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013646# SO is the extension of shared libraries `(including the dot!)
13647# -- usually .so, .sl on HP-UX, .dll on Cygwin
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13649$as_echo_n "checking SO... " >&6; }
13650if test -z "$SO"
13651then
13652 case $ac_sys_system in
13653 hp*|HP*)
13654 case `uname -m` in
13655 ia64) SO=.so;;
13656 *) SO=.sl;;
13657 esac
13658 ;;
13659 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013660 Linux*|GNU*)
13661 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013662 *) SO=.so;;
13663 esac
13664else
13665 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013666 echo
13667 echo '====================================================================='
13668 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013669 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013670 echo '+ Do you really mean to change the extension for shared libraries? +'
13671 echo '+ Continuing in 10 seconds to let you to ponder. +'
13672 echo '+ +'
13673 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013674 sleep 10
13675fi
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13677$as_echo "$SO" >&6; }
13678
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013679# Check whether right shifting a negative integer extends the sign bit
13680# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13682$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013683if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013685else
Martin v. Löwis11437992002-04-12 09:54:03 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013688 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013691/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013692
13693int main()
13694{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013695 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013696}
13697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013700 ac_cv_rshift_extends_sign=yes
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013706fi
13707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13711$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013712if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013713then
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013716
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013717fi
13718
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013719# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13721$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013722if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013727/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013728#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013729int
13730main ()
13731{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013732
13733 FILE *f = fopen("/dev/null", "r");
13734 flockfile(f);
13735 getc_unlocked(f);
13736 funlockfile(f);
13737
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 ;
13739 return 0;
13740}
13741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013743 ac_cv_have_getc_unlocked=yes
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_cv_have_getc_unlocked=no
13746fi
13747rm -f core conftest.err conftest.$ac_objext \
13748 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13752$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013753if test "$ac_cv_have_getc_unlocked" = yes
13754then
Martin v. Löwis11437992002-04-12 09:54:03 +000013755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013757
13758fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013759
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013760# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013761# save the value of LIBS so we don't actually link Python with readline
13762LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013763
Gregory P. Smith18820942008-09-07 06:24:49 +000013764# On some systems we need to link readline to a termcap compatible
13765# library. NOTE: Keep the precedence of listed libraries synchronised
13766# with setup.py.
13767py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13769$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013770for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013771 if test -z "$py_libtermcap"; then
13772 READLINE_LIBS="-lreadline"
13773 else
13774 READLINE_LIBS="-lreadline -l$py_libtermcap"
13775 fi
13776 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013778/* end confdefs.h. */
13779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780/* Override any GCC internal prototype to avoid an error.
13781 Use char because int might match the return type of a GCC
13782 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013783#ifdef __cplusplus
13784extern "C"
13785#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013786char readline ();
13787int
13788main ()
13789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013791 ;
13792 return 0;
13793}
13794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013795if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013796 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013798rm -f core conftest.err conftest.$ac_objext \
13799 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013800 if test $py_cv_lib_readline = yes; then
13801 break
13802 fi
13803done
13804# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13805#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013806if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13808$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13811$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013814
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013815fi
13816
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13819$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013820if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013822else
13823 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013824LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013826/* end confdefs.h. */
13827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828/* Override any GCC internal prototype to avoid an error.
13829 Use char because int might match the return type of a GCC
13830 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831#ifdef __cplusplus
13832extern "C"
13833#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013834char rl_callback_handler_install ();
13835int
13836main ()
13837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013839 ;
13840 return 0;
13841}
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013844 ac_cv_lib_readline_rl_callback_handler_install=yes
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013850LIBS=$ac_check_lib_save_LIBS
13851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13853$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013854if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013857
13858fi
13859
13860
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013861# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013863/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013864#include <readline/readline.h>
13865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013867 have_readline=yes
13868else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013869 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013870
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013871fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013872rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013873if test $have_readline = yes
13874then
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013876/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013877#include <readline/readline.h>
13878
13879_ACEOF
13880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013884
13885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013886rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013889/* end confdefs.h. */
13890#include <readline/readline.h>
13891
13892_ACEOF
13893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013897
13898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013899rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013900
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013901fi
13902
Martin v. Löwis0daad592001-09-30 21:09:59 +000013903# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13905$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013906if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013908else
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013910LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914/* Override any GCC internal prototype to avoid an error.
13915 Use char because int might match the return type of a GCC
13916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013917#ifdef __cplusplus
13918extern "C"
13919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013920char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 ;
13926 return 0;
13927}
13928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013931else
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013934rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013936LIBS=$ac_check_lib_save_LIBS
13937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13939$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013943
Martin v. Löwis0daad592001-09-30 21:09:59 +000013944fi
13945
Michael W. Hudson54241132001-12-07 15:38:26 +000013946
Thomas Wouters89d996e2007-09-08 17:39:28 +000013947# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13949$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013950if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013952else
13953 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013954LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013956/* end confdefs.h. */
13957
13958/* Override any GCC internal prototype to avoid an error.
13959 Use char because int might match the return type of a GCC
13960 builtin and then its argument prototype would still apply. */
13961#ifdef __cplusplus
13962extern "C"
13963#endif
13964char rl_completion_display_matches_hook ();
13965int
13966main ()
13967{
13968return rl_completion_display_matches_hook ();
13969 ;
13970 return 0;
13971}
13972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013974 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978rm -f core conftest.err conftest.$ac_objext \
13979 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013980LIBS=$ac_check_lib_save_LIBS
13981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13983$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013987
13988fi
13989
13990
Martin v. Löwis0daad592001-09-30 21:09:59 +000013991# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13993$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013998LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002/* Override any GCC internal prototype to avoid an error.
14003 Use char because int might match the return type of a GCC
14004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014005#ifdef __cplusplus
14006extern "C"
14007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014008char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014009int
14010main ()
14011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014019else
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014022rm -f core conftest.err conftest.$ac_objext \
14023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014024LIBS=$ac_check_lib_save_LIBS
14025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14027$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014028if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014031
Guido van Rossum353ae582001-07-10 16:45:32 +000014032fi
14033
Jack Jansendd19cf82001-12-06 22:36:17 +000014034
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014035# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014037/* end confdefs.h. */
14038#include <readline/readline.h>
14039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014041 have_readline=yes
14042else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014043 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014044
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014045fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014046rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014047if test $have_readline = yes
14048then
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050/* end confdefs.h. */
14051#include <readline/readline.h>
14052
14053_ACEOF
14054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014056
Matthias Kloseb9621712010-04-24 17:59:49 +000014057$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014058
14059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014060rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061
14062fi
14063
Martin v. Löwis82bca632006-02-10 20:49:30 +000014064# End of readline checks: restore LIBS
14065LIBS=$LIBS_no_readline
14066
Matthias Kloseb9621712010-04-24 17:59:49 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14068$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014069if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014071else
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014074 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014077/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014078
14079int main()
14080{
14081 int val1 = nice(1);
14082 if (val1 != -1 && val1 == nice(2))
14083 exit(0);
14084 exit(1);
14085}
14086
Martin v. Löwis11437992002-04-12 09:54:03 +000014087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014088if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014089 ac_cv_broken_nice=yes
14090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014095fi
14096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097fi
14098
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14100$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014101if test "$ac_cv_broken_nice" = yes
14102then
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014105
14106fi
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14109$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112else
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014114 ac_cv_broken_poll=no
14115else
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014117/* end confdefs.h. */
14118
14119#include <poll.h>
14120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014121int main()
14122{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014123 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014124 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014125
14126 close (42);
14127
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014128 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014129 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014131 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014133 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134 return 1;
14135}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136
14137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014139 ac_cv_broken_poll=yes
14140else
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014147fi
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14150$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014151if test "$ac_cv_broken_poll" = yes
14152then
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014155
14156fi
14157
Brett Cannon43802422005-02-10 20:48:03 +000014158# 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 +000014159# (which is not required by ISO C or UNIX spec) and/or if we support
14160# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014161ac_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 +000014162#include <$ac_cv_struct_tm>
14163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164"
Victor Stinnere0be4232011-10-25 13:06:09 +020014165if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014166
14167cat >>confdefs.h <<_ACEOF
14168#define HAVE_STRUCT_TM_TM_ZONE 1
14169_ACEOF
14170
14171
14172fi
14173
14174if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014177
14178else
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14180"
Victor Stinnere0be4232011-10-25 13:06:09 +020014181if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185fi
14186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189_ACEOF
14190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14192$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014193if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014197/* end confdefs.h. */
14198#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199#if !HAVE_DECL_TZNAME
14200extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014201#endif
14202
14203int
14204main ()
14205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014207 ;
14208 return 0;
14209}
14210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014211if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014212 ac_cv_var_tzname=yes
14213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014216rm -f core conftest.err conftest.$ac_objext \
14217 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14220$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014221 if test $ac_cv_var_tzname = yes; then
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014224
14225 fi
14226fi
14227
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014228
Martin v. Löwis1d459062005-03-14 21:23:33 +000014229# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14231$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014232if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014234else
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014237 ac_cv_working_tzset=no
14238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014240/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014241
14242#include <stdlib.h>
14243#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014244#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014245
14246#if HAVE_TZNAME
14247extern char *tzname[];
14248#endif
14249
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014250int main()
14251{
Brett Cannon18367812003-09-19 00:59:16 +000014252 /* Note that we need to ensure that not only does tzset(3)
14253 do 'something' with localtime, but it works as documented
14254 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014255 This includes making sure that tzname is set properly if
14256 tm->tm_zone does not exist since it is the alternative way
14257 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014258
14259 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014260 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014261 */
14262
Martin v. Löwis1d459062005-03-14 21:23:33 +000014263 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014264 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14265
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014266 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014267 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014268 if (localtime(&groundhogday)->tm_hour != 0)
14269 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014270#if HAVE_TZNAME
14271 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14272 if (strcmp(tzname[0], "UTC") ||
14273 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14274 exit(1);
14275#endif
Brett Cannon18367812003-09-19 00:59:16 +000014276
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014277 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014278 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014279 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014281#if HAVE_TZNAME
14282 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14283 exit(1);
14284#endif
Brett Cannon18367812003-09-19 00:59:16 +000014285
14286 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14287 tzset();
14288 if (localtime(&groundhogday)->tm_hour != 11)
14289 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014290#if HAVE_TZNAME
14291 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14292 exit(1);
14293#endif
14294
14295#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014296 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14297 exit(1);
14298 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14299 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014300#endif
Brett Cannon18367812003-09-19 00:59:16 +000014301
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014302 exit(0);
14303}
14304
14305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014306if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014307 ac_cv_working_tzset=yes
14308else
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014313fi
14314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315fi
14316
Matthias Kloseb9621712010-04-24 17:59:49 +000014317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14318$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014319if test "$ac_cv_working_tzset" = yes
14320then
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323
14324fi
14325
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014326# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14328$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014329if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014331else
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014333/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014334#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014335int
14336main ()
14337{
14338
14339struct stat st;
14340st.st_mtim.tv_nsec = 1;
14341
14342 ;
14343 return 0;
14344}
14345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014347 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014348else
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352fi
14353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14355$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014356if test "$ac_cv_stat_tv_nsec" = yes
14357then
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014360
14361fi
14362
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014363# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14365$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014366if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014370/* end confdefs.h. */
14371#include <sys/stat.h>
14372int
14373main ()
14374{
14375
14376struct stat st;
14377st.st_mtimespec.tv_nsec = 1;
14378
14379 ;
14380 return 0;
14381}
14382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014384 ac_cv_stat_tv_nsec2=yes
14385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14389fi
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14392$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014393if test "$ac_cv_stat_tv_nsec2" = yes
14394then
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014397
14398fi
14399
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014400ac_save_cppflags="$CPPFLAGS"
14401CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014402# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14404$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014405if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014409/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014410#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014411int
14412main ()
14413{
Jack Jansen666b1e72001-10-31 12:11:48 +000014414
14415 int rtn;
14416 rtn = mvwdelch(0,0,0);
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 ;
14419 return 0;
14420}
14421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014422if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014423 ac_cv_mvwdelch_is_expression=yes
14424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14428fi
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14431$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014432
14433if test "$ac_cv_mvwdelch_is_expression" = yes
14434then
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014437
14438fi
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14441$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014442if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014446/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014447#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014448int
14449main ()
14450{
Jack Jansen666b1e72001-10-31 12:11:48 +000014451
14452 WINDOW *w;
14453 w->_flags = 0;
14454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;
14456 return 0;
14457}
14458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014460 ac_cv_window_has_flags=yes
14461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14465fi
14466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14468$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014469
Jack Jansen666b1e72001-10-31 12:11:48 +000014470
14471if test "$ac_cv_window_has_flags" = yes
14472then
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014475
14476fi
14477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14479$as_echo_n "checking for is_term_resized... " >&6; }
14480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014481/* end confdefs.h. */
14482#include <curses.h>
14483int
14484main ()
14485{
14486void *x=is_term_resized
14487 ;
14488 return 0;
14489}
14490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014494
Matthias Kloseb159a552010-04-25 21:00:44 +000014495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014497else
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14499$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014500
14501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14505$as_echo_n "checking for resize_term... " >&6; }
14506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014507/* end confdefs.h. */
14508#include <curses.h>
14509int
14510main ()
14511{
14512void *x=resize_term
14513 ;
14514 return 0;
14515}
14516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014517if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014518
Matthias Kloseb9621712010-04-24 17:59:49 +000014519$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014520
Matthias Kloseb159a552010-04-25 21:00:44 +000014521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014522$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14525$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014526
14527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529
Matthias Kloseb9621712010-04-24 17:59:49 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14531$as_echo_n "checking for resizeterm... " >&6; }
14532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014533/* end confdefs.h. */
14534#include <curses.h>
14535int
14536main ()
14537{
14538void *x=resizeterm
14539 ;
14540 return 0;
14541}
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014546
Matthias Kloseb159a552010-04-25 21:00:44 +000014547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014549else
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14551$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014552
14553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014555# last curses configure check
14556CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14559$as_echo "$as_me: checking for device files" >&6;}
14560
14561if test "x$cross_compiling" = xyes; then
14562 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14564$as_echo_n "checking for /dev/ptmx... " >&6; }
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14566$as_echo "not set" >&6; }
14567 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14568 fi
14569 if test "${ac_cv_file__dev_ptc+set}" != set; then
14570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14571$as_echo_n "checking for /dev/ptc... " >&6; }
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14573$as_echo "not set" >&6; }
14574 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14575 fi
14576fi
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14579$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014580if ${ac_cv_file__dev_ptmx+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582else
14583 test "$cross_compiling" = yes &&
14584 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14585if test -r "/dev/ptmx"; then
14586 ac_cv_file__dev_ptmx=yes
14587else
14588 ac_cv_file__dev_ptmx=no
14589fi
14590fi
14591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14592$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14593if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014594
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014595fi
14596
14597if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014600
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14603$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014604if ${ac_cv_file__dev_ptc+:} false; then :
14605 $as_echo_n "(cached) " >&6
14606else
14607 test "$cross_compiling" = yes &&
14608 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14609if test -r "/dev/ptc"; then
14610 ac_cv_file__dev_ptc=yes
14611else
14612 ac_cv_file__dev_ptc=no
14613fi
14614fi
14615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14616$as_echo "$ac_cv_file__dev_ptc" >&6; }
14617if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014618
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014619fi
14620
14621if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014624
Neal Norwitz865400f2003-03-21 01:42:58 +000014625fi
14626
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014627if test "$have_long_long" = yes
14628then
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14630$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014631 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014635 ac_cv_have_long_long_format="cross -- assuming no"
14636 if test x$GCC = xyes; then
14637 save_CFLAGS=$CFLAGS
14638 CFLAGS="$CFLAGS -Werror -Wformat"
14639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14640/* end confdefs.h. */
14641
14642 #include <stdio.h>
14643 #include <stddef.h>
14644
14645int
14646main ()
14647{
14648
14649 char *buffer;
14650 sprintf(buffer, "%lld", (long long)123);
14651 sprintf(buffer, "%lld", (long long)-123);
14652 sprintf(buffer, "%llu", (unsigned long long)123);
14653
14654 ;
14655 return 0;
14656}
14657_ACEOF
14658if ac_fn_c_try_compile "$LINENO"; then :
14659 ac_cv_have_long_long_format=yes
14660
14661fi
14662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14663 CFLAGS=$save_CFLAGS
14664 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014667/* end confdefs.h. */
14668
14669 #include <stdio.h>
14670 #include <stddef.h>
14671 #include <string.h>
14672
14673 #ifdef HAVE_SYS_TYPES_H
14674 #include <sys/types.h>
14675 #endif
14676
14677 int main()
14678 {
14679 char buffer[256];
14680
14681 if (sprintf(buffer, "%lld", (long long)123) < 0)
14682 return 1;
14683 if (strcmp(buffer, "123"))
14684 return 1;
14685
14686 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14687 return 1;
14688 if (strcmp(buffer, "-123"))
14689 return 1;
14690
14691 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14692 return 1;
14693 if (strcmp(buffer, "123"))
14694 return 1;
14695
14696 return 0;
14697 }
14698
14699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014700if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014701 ac_cv_have_long_long_format=yes
14702else
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014707fi
14708
14709
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014710fi
14711
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14713$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014714fi
14715
Mark Dickinson89d7d412009-12-31 20:50:59 +000014716if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014717then
14718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014720
14721fi
14722
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014723if test $ac_sys_system = Darwin
14724then
14725 LIBS="$LIBS -framework CoreFoundation"
14726fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14729$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014732else
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014734 ac_cv_have_size_t_format="cross -- assuming yes"
14735
Thomas Wouters477c8d52006-05-27 19:21:47 +000014736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014738/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014739
Thomas Wouters477c8d52006-05-27 19:21:47 +000014740#include <stdio.h>
14741#include <stddef.h>
14742#include <string.h>
14743
Christian Heimes2c181612007-12-17 20:04:13 +000014744#ifdef HAVE_SYS_TYPES_H
14745#include <sys/types.h>
14746#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014747
14748#ifdef HAVE_SSIZE_T
14749typedef ssize_t Py_ssize_t;
14750#elif SIZEOF_VOID_P == SIZEOF_LONG
14751typedef long Py_ssize_t;
14752#else
14753typedef int Py_ssize_t;
14754#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014755
Christian Heimes2c181612007-12-17 20:04:13 +000014756int main()
14757{
14758 char buffer[256];
14759
Thomas Wouters477c8d52006-05-27 19:21:47 +000014760 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14761 return 1;
14762
Thomas Wouters89f507f2006-12-13 04:49:30 +000014763 if (strcmp(buffer, "123"))
14764 return 1;
14765
14766 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14767 return 1;
14768
14769 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014770 return 1;
14771
14772 return 0;
14773}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014774
Thomas Wouters477c8d52006-05-27 19:21:47 +000014775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014777 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014778else
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014783fi
14784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14787$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014788if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014791
14792fi
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014795#ifdef HAVE_SYS_TYPES_H
14796#include <sys/types.h>
14797#endif
14798#ifdef HAVE_SYS_SOCKET_H
14799#include <sys/socket.h>
14800#endif
14801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802"
Victor Stinnere0be4232011-10-25 13:06:09 +020014803if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014806
Matthias Kloseb9621712010-04-24 17:59:49 +000014807$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014808
14809fi
14810
Michael W. Hudson54241132001-12-07 15:38:26 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14813$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014814if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014818 ac_cv_broken_mbstowcs=no
14819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014821/* end confdefs.h. */
14822
14823#include<stdlib.h>
14824int main() {
14825 size_t len = -1;
14826 const char *str = "text";
14827 len = mbstowcs(NULL, str, 0);
14828 return (len != 4);
14829}
14830
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014833 ac_cv_broken_mbstowcs=no
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014839fi
14840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014841fi
14842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14844$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014845if test "$ac_cv_broken_mbstowcs" = yes
14846then
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014849
14850fi
14851
Antoine Pitroub52ec782009-01-25 16:34:23 +000014852# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14854$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014855
14856# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014857if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014858 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014859if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014860then
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14865$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014866fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014867if test "$withval" = no
14868then
14869
14870$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14873$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014874fi
14875
Antoine Pitrou042b1282010-08-13 21:15:58 +000014876else
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14878$as_echo "no value specified" >&6; }
14879fi
14880
Antoine Pitroub52ec782009-01-25 16:34:23 +000014881
Matthias Kloseb17289e2012-03-15 19:51:34 +010014882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14883$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14884if ${ac_cv_computed_gotos+:} false; then :
14885 $as_echo_n "(cached) " >&6
14886else
14887 if test "$cross_compiling" = yes; then :
14888 if test "${with_computed_gotos+set}" = set; then
14889 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14890 else
14891 ac_cv_computed_gotos=no
14892 fi
14893else
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895/* end confdefs.h. */
14896
14897int main(int argc, char **argv)
14898{
14899 static void *targets[1] = { &&LABEL1 };
14900 goto LABEL2;
14901LABEL1:
14902 return 0;
14903LABEL2:
14904 goto *targets[0];
14905 return 1;
14906}
14907
14908_ACEOF
14909if ac_fn_c_try_run "$LINENO"; then :
14910 ac_cv_computed_gotos=yes
14911else
14912 ac_cv_computed_gotos=no
14913fi
14914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14915 conftest.$ac_objext conftest.beam conftest.$ac_ext
14916fi
14917
14918fi
14919
14920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14921$as_echo "$ac_cv_computed_gotos" >&6; }
14922case "$ac_cv_computed_gotos" in yes*)
14923
14924$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14925
14926esac
14927
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014928case $ac_sys_system in
14929AIX*)
14930
14931$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14932 ;;
14933esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014934
Michael W. Hudson54241132001-12-07 15:38:26 +000014935
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014936
14937
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014938for h in `(cd $srcdir;echo Python/thread_*.h)`
14939do
14940 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14941done
14942
Michael W. Hudson54241132001-12-07 15:38:26 +000014943
Neal Norwitzd24499d2005-12-18 21:36:39 +000014944SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14946$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014947for dir in $SRCDIRS; do
14948 if test ! -d $dir; then
14949 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014950 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014951done
Matthias Kloseb9621712010-04-24 17:59:49 +000014952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14953$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014954
Stefan Krah1919b7e2012-03-21 18:25:23 +010014955# Availability of -O2:
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14957$as_echo_n "checking for -O2... " >&6; }
14958saved_cflags="$CFLAGS"
14959CFLAGS="-O2"
14960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961/* end confdefs.h. */
14962
14963int
14964main ()
14965{
14966
14967
14968 ;
14969 return 0;
14970}
14971_ACEOF
14972if ac_fn_c_try_compile "$LINENO"; then :
14973 have_O2=yes
14974else
14975 have_O2=no
14976fi
14977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14979$as_echo "$have_O2" >&6; }
14980CFLAGS="$saved_cflags"
14981
14982# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14983# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14985$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14986saved_cflags="$CFLAGS"
14987CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14988if test "$have_O2" = no; then
14989 CFLAGS=""
14990fi
14991if test "$cross_compiling" = yes; then :
14992 have_glibc_memmove_bug=undefined
14993else
14994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14995/* end confdefs.h. */
14996
14997#include <stdio.h>
14998#include <stdlib.h>
14999#include <string.h>
15000void foo(void *p, void *q) { memmove(p, q, 19); }
15001int main() {
15002 char a[32] = "123456789000000000";
15003 foo(&a[9], a);
15004 if (strcmp(a, "123456789123456789000000000") != 0)
15005 return 1;
15006 foo(a, &a[9]);
15007 if (strcmp(a, "123456789000000000") != 0)
15008 return 1;
15009 return 0;
15010}
15011
15012_ACEOF
15013if ac_fn_c_try_run "$LINENO"; then :
15014 have_glibc_memmove_bug=no
15015else
15016 have_glibc_memmove_bug=yes
15017fi
15018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15019 conftest.$ac_objext conftest.beam conftest.$ac_ext
15020fi
15021
15022CFLAGS="$saved_cflags"
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15024$as_echo "$have_glibc_memmove_bug" >&6; }
15025if test "$have_glibc_memmove_bug" = yes; then
15026
15027$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15028
15029fi
15030
15031if test "$have_gcc_asm_for_x87" = yes; then
15032 # Some versions of gcc miscompile inline asm:
15033 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15034 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15035 case $CC in
15036 *gcc*)
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15038$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15039 saved_cflags="$CFLAGS"
15040 CFLAGS="-O2"
15041 if test "$cross_compiling" = yes; then :
15042 have_ipa_pure_const_bug=undefined
15043else
15044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045/* end confdefs.h. */
15046
15047 __attribute__((noinline)) int
15048 foo(int *p) {
15049 int r;
15050 asm ( "movl \$6, (%1)\n\t"
15051 "xorl %0, %0\n\t"
15052 : "=r" (r) : "r" (p) : "memory"
15053 );
15054 return r;
15055 }
15056 int main() {
15057 int p = 8;
15058 if ((foo(&p) ? : p) != 6)
15059 return 1;
15060 return 0;
15061 }
15062
15063_ACEOF
15064if ac_fn_c_try_run "$LINENO"; then :
15065 have_ipa_pure_const_bug=no
15066else
15067 have_ipa_pure_const_bug=yes
15068fi
15069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15070 conftest.$ac_objext conftest.beam conftest.$ac_ext
15071fi
15072
15073 CFLAGS="$saved_cflags"
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15075$as_echo "$have_ipa_pure_const_bug" >&6; }
15076 if test "$have_ipa_pure_const_bug" = yes; then
15077
15078$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15079
15080 fi
15081 ;;
15082 esac
15083fi
15084
Guido van Rossum627b2d71993-12-24 10:39:16 +000015085# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015086ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015087
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015088ac_config_files="$ac_config_files Modules/ld_so_aix"
15089
Martin v. Löwis11437992002-04-12 09:54:03 +000015090cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015091# This file is a shell script that caches the results of configure
15092# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015093# scripts and configure runs, see configure's option --config-cache.
15094# It is not useful on other systems. If it contains results you don't
15095# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096#
Martin v. Löwis11437992002-04-12 09:54:03 +000015097# config.status only pays attention to the cache file if you give it
15098# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015099#
Skip Montanaro6dead952003-09-25 14:50:04 +000015100# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015101# loading this file, other *unset* `ac_cv_foo' will be assigned the
15102# following values.
15103
15104_ACEOF
15105
Guido van Rossumf78abae1997-01-21 22:02:36 +000015106# The following way of writing the cache mishandles newlines in values,
15107# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015109# Ultrix sh set writes to stderr and can't be redirected directly,
15110# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111(
15112 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15113 eval ac_val=\$$ac_var
15114 case $ac_val in #(
15115 *${as_nl}*)
15116 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15118$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 esac
15120 case $ac_var in #(
15121 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15123 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124 esac ;;
15125 esac
15126 done
15127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15130 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 # `set' does not quote correctly, so add quotes: double-quote
15132 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015134 "s/'/'\\\\''/g;
15135 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 *)
15138 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 esac |
15142 sort
15143) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15149 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15151 :end' >>confcache
15152if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15153 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015154 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15156$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015157 if test ! -f "$cache_file" || test -h "$cache_file"; then
15158 cat confcache >"$cache_file"
15159 else
15160 case $cache_file in #(
15161 */* | ?:*)
15162 mv -f confcache "$cache_file"$$ &&
15163 mv -f "$cache_file"$$ "$cache_file" ;; #(
15164 *)
15165 mv -f confcache "$cache_file" ;;
15166 esac
15167 fi
15168 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015169 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15171$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015172 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015173fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015174rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176test "x$prefix" = xNONE && prefix=$ac_default_prefix
15177# Let make expand exec_prefix.
15178test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015179
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015180DEFS=-DHAVE_CONFIG_H
15181
Skip Montanaro6dead952003-09-25 14:50:04 +000015182ac_libobjs=
15183ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015184U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015185for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15186 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15190 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15192 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015193done
15194LIBOBJS=$ac_libobjs
15195
15196LTLIBOBJS=$ac_ltlibobjs
15197
15198
Martin v. Löwis11437992002-04-12 09:54:03 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200
Victor Stinnere0be4232011-10-25 13:06:09 +020015201: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015202ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015203ac_clean_files_save=$ac_clean_files
15204ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015205{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15206$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15207as_write_fail=0
15208cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015209#! $SHELL
15210# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015211# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015213# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214
Martin v. Löwis11437992002-04-12 09:54:03 +000015215debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015216ac_cs_recheck=false
15217ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219SHELL=\${CONFIG_SHELL-$SHELL}
15220export SHELL
15221_ASEOF
15222cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15223## -------------------- ##
15224## M4sh Initialization. ##
15225## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227# Be more Bourne compatible
15228DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015229if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 emulate sh
15231 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015233 # is contrary to our usage. Disable this feature.
15234 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015236else
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 case `(set -o) 2>/dev/null` in #(
15238 *posix*) :
15239 set -o posix ;; #(
15240 *) :
15241 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015243fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015244
15245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246as_nl='
15247'
15248export as_nl
15249# Printing a long string crashes Solaris 7 /usr/bin/printf.
15250as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15251as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15252as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15253# Prefer a ksh shell builtin over an external printf program on Solaris,
15254# but without wasting forks for bash or zsh.
15255if test -z "$BASH_VERSION$ZSH_VERSION" \
15256 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15257 as_echo='print -r --'
15258 as_echo_n='print -rn --'
15259elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15260 as_echo='printf %s\n'
15261 as_echo_n='printf %s'
15262else
15263 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15264 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15265 as_echo_n='/usr/ucb/echo -n'
15266 else
15267 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15268 as_echo_n_body='eval
15269 arg=$1;
15270 case $arg in #(
15271 *"$as_nl"*)
15272 expr "X$arg" : "X\\(.*\\)$as_nl";
15273 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15274 esac;
15275 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15276 '
15277 export as_echo_n_body
15278 as_echo_n='sh -c $as_echo_n_body as_echo'
15279 fi
15280 export as_echo_body
15281 as_echo='sh -c $as_echo_body as_echo'
15282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
15284# The user is always right.
15285if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 PATH_SEPARATOR=:
15287 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15288 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15289 PATH_SEPARATOR=';'
15290 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293
15294# IFS
15295# We need space, tab and new line, in precisely that order. Quoting is
15296# there to prevent editors from complaining about space-tab.
15297# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15298# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299IFS=" "" $as_nl"
15300
15301# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015302as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015303case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304 *[\\/]* ) as_myself=$0 ;;
15305 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015306for as_dir in $PATH
15307do
15308 IFS=$as_save_IFS
15309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15311 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314 ;;
15315esac
15316# We did not find ourselves, most probably we were run as `sh COMMAND'
15317# in which case we are not to be found in the path.
15318if test "x$as_myself" = x; then
15319 as_myself=$0
15320fi
15321if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15323 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324fi
15325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326# Unset variables that we do not need and which cause bugs (e.g. in
15327# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15328# suppresses any "Segmentation fault" message there. '((' could
15329# trigger a bug in pdksh 5.2.14.
15330for as_var in BASH_ENV ENV MAIL MAILPATH
15331do eval test x\${$as_var+set} = xset \
15332 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333done
15334PS1='$ '
15335PS2='> '
15336PS4='+ '
15337
15338# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015339LC_ALL=C
15340export LC_ALL
15341LANGUAGE=C
15342export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344# CDPATH.
15345(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15346
15347
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015348# as_fn_error STATUS ERROR [LINENO LOG_FD]
15349# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015350# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15351# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015352# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015353as_fn_error ()
15354{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015355 as_status=$1; test $as_status -eq 0 && as_status=1
15356 if test "$4"; then
15357 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15358 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015360 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 as_fn_exit $as_status
15362} # as_fn_error
15363
15364
15365# as_fn_set_status STATUS
15366# -----------------------
15367# Set $? to STATUS, without forking.
15368as_fn_set_status ()
15369{
15370 return $1
15371} # as_fn_set_status
15372
15373# as_fn_exit STATUS
15374# -----------------
15375# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15376as_fn_exit ()
15377{
15378 set +e
15379 as_fn_set_status $1
15380 exit $1
15381} # as_fn_exit
15382
15383# as_fn_unset VAR
15384# ---------------
15385# Portably unset VAR.
15386as_fn_unset ()
15387{
15388 { eval $1=; unset $1;}
15389}
15390as_unset=as_fn_unset
15391# as_fn_append VAR VALUE
15392# ----------------------
15393# Append the text in VALUE to the end of the definition contained in VAR. Take
15394# advantage of any shell optimizations that allow amortized linear growth over
15395# repeated appends, instead of the typical quadratic growth present in naive
15396# implementations.
15397if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15398 eval 'as_fn_append ()
15399 {
15400 eval $1+=\$2
15401 }'
15402else
15403 as_fn_append ()
15404 {
15405 eval $1=\$$1\$2
15406 }
15407fi # as_fn_append
15408
15409# as_fn_arith ARG...
15410# ------------------
15411# Perform arithmetic evaluation on the ARGs, and store the result in the
15412# global $as_val. Take advantage of shells that can avoid forks. The arguments
15413# must be portable across $(()) and expr.
15414if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15415 eval 'as_fn_arith ()
15416 {
15417 as_val=$(( $* ))
15418 }'
15419else
15420 as_fn_arith ()
15421 {
15422 as_val=`expr "$@" || test $? -eq 1`
15423 }
15424fi # as_fn_arith
15425
15426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427if expr a : '\(a\)' >/dev/null 2>&1 &&
15428 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15429 as_expr=expr
15430else
15431 as_expr=false
15432fi
15433
15434if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15435 as_basename=basename
15436else
15437 as_basename=false
15438fi
15439
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15441 as_dirname=dirname
15442else
15443 as_dirname=false
15444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446as_me=`$as_basename -- "$0" ||
15447$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15448 X"$0" : 'X\(//\)$' \| \
15449 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015450$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451 sed '/^.*\/\([^/][^/]*\)\/*$/{
15452 s//\1/
15453 q
15454 }
15455 /^X\/\(\/\/\)$/{
15456 s//\1/
15457 q
15458 }
15459 /^X\/\(\/\).*/{
15460 s//\1/
15461 q
15462 }
15463 s/.*/./; q'`
15464
Matthias Kloseb9621712010-04-24 17:59:49 +000015465# Avoid depending upon Character Ranges.
15466as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15467as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15468as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15469as_cr_digits='0123456789'
15470as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471
15472ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015473case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 xy) ECHO_C='\c';;
15478 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15479 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480 esac;;
15481*)
15482 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486if test -d conf$$.dir; then
15487 rm -f conf$$.dir/conf$$.file
15488else
15489 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if (echo >conf$$.file) 2>/dev/null; then
15493 if ln -s conf$$.file conf$$ 2>/dev/null; then
15494 as_ln_s='ln -s'
15495 # ... but there are two gotchas:
15496 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15497 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Trent Nelsona4519a62012-10-16 11:51:08 -040015498 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Trent Nelsona4519a62012-10-16 11:51:08 -040015500 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 elif ln conf$$.file conf$$ 2>/dev/null; then
15502 as_ln_s=ln
15503 else
Trent Nelsona4519a62012-10-16 11:51:08 -040015504 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015506else
Trent Nelsona4519a62012-10-16 11:51:08 -040015507 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15510rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512
15513# as_fn_mkdir_p
15514# -------------
15515# Create "$as_dir" as a directory, including parents if necessary.
15516as_fn_mkdir_p ()
15517{
15518
15519 case $as_dir in #(
15520 -*) as_dir=./$as_dir;;
15521 esac
15522 test -d "$as_dir" || eval $as_mkdir_p || {
15523 as_dirs=
15524 while :; do
15525 case $as_dir in #(
15526 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15527 *) as_qdir=$as_dir;;
15528 esac
15529 as_dirs="'$as_qdir' $as_dirs"
15530 as_dir=`$as_dirname -- "$as_dir" ||
15531$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15532 X"$as_dir" : 'X\(//\)[^/]' \| \
15533 X"$as_dir" : 'X\(//\)$' \| \
15534 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15535$as_echo X"$as_dir" |
15536 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15537 s//\1/
15538 q
15539 }
15540 /^X\(\/\/\)[^/].*/{
15541 s//\1/
15542 q
15543 }
15544 /^X\(\/\/\)$/{
15545 s//\1/
15546 q
15547 }
15548 /^X\(\/\).*/{
15549 s//\1/
15550 q
15551 }
15552 s/.*/./; q'`
15553 test -d "$as_dir" && break
15554 done
15555 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015556 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015557
15558
15559} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015560if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015562else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015563 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015564 as_mkdir_p=false
15565fi
15566
Trent Nelsona4519a62012-10-16 11:51:08 -040015567
15568# as_fn_executable_p FILE
15569# -----------------------
15570# Test if FILE is an executable regular file.
15571as_fn_executable_p ()
15572{
15573 test -f "$1" && test -x "$1"
15574} # as_fn_executable_p
15575as_test_x='test -x'
15576as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015577
15578# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015579as_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 +000015580
15581# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015582as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015583
15584
Martin v. Löwis11437992002-04-12 09:54:03 +000015585exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015586## ----------------------------------- ##
15587## Main body of $CONFIG_STATUS script. ##
15588## ----------------------------------- ##
15589_ASEOF
15590test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15593# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015594# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595# values after options handling.
15596ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015597This file was extended by python $as_me 3.4, which was
Trent Nelsona4519a62012-10-16 11:51:08 -040015598generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015599
15600 CONFIG_FILES = $CONFIG_FILES
15601 CONFIG_HEADERS = $CONFIG_HEADERS
15602 CONFIG_LINKS = $CONFIG_LINKS
15603 CONFIG_COMMANDS = $CONFIG_COMMANDS
15604 $ $0 $@
15605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606on `(hostname || uname -n) 2>/dev/null | sed 1q`
15607"
15608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609_ACEOF
15610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611case $ac_config_files in *"
15612"*) set x $ac_config_files; shift; ac_config_files=$*;;
15613esac
15614
15615case $ac_config_headers in *"
15616"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15617esac
15618
15619
15620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015621# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015622config_files="$ac_config_files"
15623config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
Matthias Kloseb9621712010-04-24 17:59:49 +000015627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015628ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015629\`$as_me' instantiates files and other configuration actions
15630from templates according to the current configuration. Unless the files
15631and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 --config print configuration, then exit
15638 -q, --quiet, --silent
15639 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 -d, --debug don't remove temporary files
15641 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 --file=FILE[:TEMPLATE]
15643 instantiate the configuration file FILE
15644 --header=FILE[:TEMPLATE]
15645 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
15647Configuration files:
15648$config_files
15649
15650Configuration headers:
15651$config_headers
15652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15657ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015658ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015659python config.status 3.4
Trent Nelsona4519a62012-10-16 11:51:08 -040015660configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
Trent Nelsona4519a62012-10-16 11:51:08 -040015663Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015664This config.status script is free software; the Free Software Foundation
15665gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666
15667ac_pwd='$ac_pwd'
15668srcdir='$srcdir'
15669INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015670MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015671test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015672_ACEOF
15673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15675# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015676ac_need_defaults=:
15677while test $# != 0
15678do
15679 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015680 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15682 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015683 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015684 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015685 --*=)
15686 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15687 ac_optarg=
15688 ac_shift=:
15689 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015691 ac_option=$1
15692 ac_optarg=$2
15693 ac_shift=shift
15694 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 esac
15696
Skip Montanaro6dead952003-09-25 14:50:04 +000015697 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015699 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15700 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo "$ac_cs_version"; exit ;;
15703 --config | --confi | --conf | --con | --co | --c )
15704 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 debug=: ;;
15707 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015708 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015709 case $ac_optarg in
15710 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015711 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 esac
15713 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 ac_need_defaults=false;;
15715 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015716 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 case $ac_optarg in
15718 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15719 esac
15720 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722 --he | --h)
15723 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015724 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015725Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015728 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15729 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15730 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
15732 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015733 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015734Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
15739 esac
15740 shift
15741done
15742
Skip Montanaro6dead952003-09-25 14:50:04 +000015743ac_configure_extra_args=
15744
15745if $ac_cs_silent; then
15746 exec 6>/dev/null
15747 ac_configure_extra_args="$ac_configure_extra_args --silent"
15748fi
15749
15750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015751cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015752if \$ac_cs_recheck; then
Trent Nelsona4519a62012-10-16 11:51:08 -040015753 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 shift
15755 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15756 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015758 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015759fi
15760
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763exec 5>>config.log
15764{
15765 echo
15766 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15767## Running $as_me. ##
15768_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015773cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777
15778# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015779for ac_config_target in $ac_config_targets
15780do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 case $ac_config_target in
15782 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15783 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15784 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015785 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15786 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15788 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015789 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015790 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791
Victor Stinnere0be4232011-10-25 13:06:09 +020015792 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 esac
15794done
15795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796
Martin v. Löwis11437992002-04-12 09:54:03 +000015797# If the user did not use the arguments to specify the items to instantiate,
15798# then the envvar interface is used. Set only those that are not.
15799# We use the long form for the default assignment because of an extremely
15800# bizarre bug on SunOS 4.1.3.
15801if $ac_need_defaults; then
15802 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15803 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15804fi
15805
Skip Montanaro6dead952003-09-25 14:50:04 +000015806# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015808# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809# Hook for its removal unless debugging.
15810# Note that there is a small window in which the directory will not be cleaned:
15811# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015812$debug ||
15813{
Victor Stinnere0be4232011-10-25 13:06:09 +020015814 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015816 : "${ac_tmp:=$tmp}"
15817 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015820}
Martin v. Löwis11437992002-04-12 09:54:03 +000015821# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015825 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015826} ||
15827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828 tmp=./conf$$-$RANDOM
15829 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015830} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015831ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833# Set up the scripts for CONFIG_FILES section.
15834# No need to generate them if there are no CONFIG_FILES.
15835# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838
15839ac_cr=`echo X | tr X '\015'`
15840# On cygwin, bash can eat \r inside `` if the user requested igncr.
15841# But we know of no other shell where ac_cr would be empty at this
15842# point, so we can use a bashism as a fallback.
15843if test "x$ac_cr" = x; then
15844 eval ac_cr=\$\'\\r\'
15845fi
15846ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15847if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015848 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015849else
15850 ac_cs_awk_cr=$ac_cr
15851fi
15852
Victor Stinnere0be4232011-10-25 13:06:09 +020015853echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015854_ACEOF
15855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856
Matthias Kloseb9621712010-04-24 17:59:49 +000015857{
15858 echo "cat >conf$$subs.awk <<_ACEOF" &&
15859 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15860 echo "_ACEOF"
15861} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015862 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15863ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864ac_delim='%!_!# '
15865for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015867 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15870 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871 break
15872 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015873 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 else
15875 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877done
Matthias Kloseb9621712010-04-24 17:59:49 +000015878rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015881cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015883sed -n '
15884h
15885s/^/S["/; s/!.*/"]=/
15886p
15887g
15888s/^[^!]*!//
15889:repl
15890t repl
15891s/'"$ac_delim"'$//
15892t delim
15893:nl
15894h
15895s/\(.\{148\}\)..*/\1/
15896t more1
15897s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15898p
15899n
15900b repl
15901:more1
15902s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15903p
15904g
15905s/.\{148\}//
15906t nl
15907:delim
15908h
15909s/\(.\{148\}\)..*/\1/
15910t more2
15911s/["\\]/\\&/g; s/^/"/; s/$/"/
15912p
15913b
15914:more2
15915s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15916p
15917g
15918s/.\{148\}//
15919t delim
15920' <conf$$subs.awk | sed '
15921/^[^""]/{
15922 N
15923 s/\n//
15924}
15925' >>$CONFIG_STATUS || ac_write_fail=1
15926rm -f conf$$subs.awk
15927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15928_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015929cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 for (key in S) S_is_set[key] = 1
15931 FS = ""
15932
15933}
15934{
15935 line = $ 0
15936 nfields = split(line, field, "@")
15937 substed = 0
15938 len = length(field[1])
15939 for (i = 2; i < nfields; i++) {
15940 key = field[i]
15941 keylen = length(key)
15942 if (S_is_set[key]) {
15943 value = S[key]
15944 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15945 len += length(value) + length(field[++i])
15946 substed = 1
15947 } else
15948 len += 1 + keylen
15949 }
15950
15951 print line
15952}
15953
15954_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15957if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15958 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15959else
15960 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015961fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015962 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015963_ACEOF
15964
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015965# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15966# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967# trailing colons and then remove the whole line if VPATH becomes empty
15968# (actually we leave an empty line to preserve line numbers).
15969if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015970 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15971h
15972s///
15973s/^/:/
15974s/[ ]*$/:/
15975s/:\$(srcdir):/:/g
15976s/:\${srcdir}:/:/g
15977s/:@srcdir@:/:/g
15978s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015980x
15981s/\(=[ ]*\).*/\1/
15982G
15983s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984s/^[^=]*=[ ]*$//
15985}'
15986fi
15987
Matthias Kloseb9621712010-04-24 17:59:49 +000015988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015989fi # test -n "$CONFIG_FILES"
15990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991# Set up the scripts for CONFIG_HEADERS section.
15992# No need to generate them if there are no CONFIG_HEADERS.
15993# This happens for instance with `./config.status Makefile'.
15994if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015995cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015996BEGIN {
15997_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999# Transform confdefs.h into an awk script `defines.awk', embedded as
16000# here-document in config.status, that substitutes the proper values into
16001# config.h.in to produce config.h.
16002
16003# Create a delimiter string that does not exist in confdefs.h, to ease
16004# handling of long lines.
16005ac_delim='%!_!# '
16006for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016007 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16008 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 break
16010 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016011 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 else
16013 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16014 fi
16015done
16016
16017# For the awk script, D is an array of macro values keyed by name,
16018# likewise P contains macro parameters if any. Preserve backslash
16019# newline sequences.
16020
16021ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16022sed -n '
16023s/.\{148\}/&'"$ac_delim"'/g
16024t rset
16025:rset
16026s/^[ ]*#[ ]*define[ ][ ]*/ /
16027t def
16028d
16029:def
16030s/\\$//
16031t bsnl
16032s/["\\]/\\&/g
16033s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16034D["\1"]=" \3"/p
16035s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16036d
16037:bsnl
16038s/["\\]/\\&/g
16039s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16040D["\1"]=" \3\\\\\\n"\\/p
16041t cont
16042s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16043t cont
16044d
16045:cont
16046n
16047s/.\{148\}/&'"$ac_delim"'/g
16048t clear
16049:clear
16050s/\\$//
16051t bsnlc
16052s/["\\]/\\&/g; s/^/"/; s/$/"/p
16053d
16054:bsnlc
16055s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16056b cont
16057' <confdefs.h | sed '
16058s/'"$ac_delim"'/"\\\
16059"/g' >>$CONFIG_STATUS || ac_write_fail=1
16060
16061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16062 for (key in D) D_is_set[key] = 1
16063 FS = ""
16064}
16065/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16066 line = \$ 0
16067 split(line, arg, " ")
16068 if (arg[1] == "#") {
16069 defundef = arg[2]
16070 mac1 = arg[3]
16071 } else {
16072 defundef = substr(arg[1], 2)
16073 mac1 = arg[2]
16074 }
16075 split(mac1, mac2, "(") #)
16076 macro = mac2[1]
16077 prefix = substr(line, 1, index(line, defundef) - 1)
16078 if (D_is_set[macro]) {
16079 # Preserve the white space surrounding the "#".
16080 print prefix "define", macro P[macro] D[macro]
16081 next
16082 } else {
16083 # Replace #undef with comments. This is necessary, for example,
16084 # in the case of _POSIX_SOURCE, which is predefined and required
16085 # on some systems where configure will not decide to define it.
16086 if (defundef == "undef") {
16087 print "/*", prefix defundef, macro, "*/"
16088 next
16089 }
16090 }
16091}
16092{ print }
16093_ACAWK
16094_ACEOF
16095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016096 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016097fi # test -n "$CONFIG_HEADERS"
16098
16099
16100eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16101shift
16102for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103do
16104 case $ac_tag in
16105 :[FHLC]) ac_mode=$ac_tag; continue;;
16106 esac
16107 case $ac_mode$ac_tag in
16108 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016109 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110 :[FH]-) ac_tag=-:-;;
16111 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16112 esac
16113 ac_save_IFS=$IFS
16114 IFS=:
16115 set x $ac_tag
16116 IFS=$ac_save_IFS
16117 shift
16118 ac_file=$1
16119 shift
16120
16121 case $ac_mode in
16122 :L) ac_source=$1;;
16123 :[FH])
16124 ac_file_inputs=
16125 for ac_f
16126 do
16127 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016128 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 *) # Look for the file first in the build tree, then in the source tree
16130 # (if the path is not absolute). The absolute path cannot be DOS-style,
16131 # because $ac_f cannot contain `:'.
16132 test -f "$ac_f" ||
16133 case $ac_f in
16134 [\\/$]*) false;;
16135 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16136 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016137 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16140 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141 done
16142
16143 # Let's still pretend it is `configure' which instantiates (i.e., don't
16144 # use $as_me), people would be surprised to read:
16145 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016146 configure_input='Generated from '`
16147 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16148 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149 if test x"$ac_file" != x-; then
16150 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016151 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16152$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 # Neutralize special characters interpreted by sed in replacement strings.
16155 case $configure_input in #(
16156 *\&* | *\|* | *\\* )
16157 ac_sed_conf_input=`$as_echo "$configure_input" |
16158 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16159 *) ac_sed_conf_input=$configure_input;;
16160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161
16162 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016163 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16164 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 esac
16166 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 esac
16168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016170$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016171 X"$ac_file" : 'X\(//\)[^/]' \| \
16172 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016174$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16176 s//\1/
16177 q
16178 }
16179 /^X\(\/\/\)[^/].*/{
16180 s//\1/
16181 q
16182 }
16183 /^X\(\/\/\)$/{
16184 s//\1/
16185 q
16186 }
16187 /^X\(\/\).*/{
16188 s//\1/
16189 q
16190 }
16191 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 ac_builddir=.
16194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195case "$ac_dir" in
16196.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16197*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016198 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201 case $ac_top_builddir_sub in
16202 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16203 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16204 esac ;;
16205esac
16206ac_abs_top_builddir=$ac_pwd
16207ac_abs_builddir=$ac_pwd$ac_dir_suffix
16208# for backward compatibility:
16209ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
16211case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214 ac_top_srcdir=$ac_top_builddir_sub
16215 ac_abs_top_srcdir=$ac_pwd ;;
16216 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 ac_top_srcdir=$srcdir
16219 ac_abs_top_srcdir=$srcdir ;;
16220 *) # Relative name.
16221 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16222 ac_top_srcdir=$ac_top_build_prefix$srcdir
16223 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016224esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 case $ac_mode in
16229 :F)
16230 #
16231 # CONFIG_FILE
16232 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016233
16234 case $INSTALL in
16235 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016238 ac_MKDIR_P=$MKDIR_P
16239 case $MKDIR_P in
16240 [\\/$]* | ?:[\\/]* ) ;;
16241 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16242 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016243_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244
Matthias Kloseb9621712010-04-24 17:59:49 +000016245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246# If the template does not know about datarootdir, expand it.
16247# FIXME: This hack should be removed a few years after 2.60.
16248ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016249ac_sed_dataroot='
16250/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 p
16252 q
16253}
16254/@datadir@/p
16255/@docdir@/p
16256/@infodir@/p
16257/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016258/@mandir@/p'
16259case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260*datarootdir*) ac_datarootdir_seen=yes;;
16261*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16263$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266 ac_datarootdir_hack='
16267 s&@datadir@&$datadir&g
16268 s&@docdir@&$docdir&g
16269 s&@infodir@&$infodir&g
16270 s&@localedir@&$localedir&g
16271 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016272 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273esac
16274_ACEOF
16275
16276# Neutralize VPATH when `$srcdir' = `.'.
16277# Shell code in configure.ac might set extrasub.
16278# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16280ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016281$extrasub
16282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016283cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016284:t
16285/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016286s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016288s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289s&@srcdir@&$ac_srcdir&;t t
16290s&@abs_srcdir@&$ac_abs_srcdir&;t t
16291s&@top_srcdir@&$ac_top_srcdir&;t t
16292s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16293s&@builddir@&$ac_builddir&;t t
16294s&@abs_builddir@&$ac_abs_builddir&;t t
16295s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16296s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016297s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016299"
Victor Stinnere0be4232011-10-25 13:06:09 +020016300eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16301 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016304 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16305 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16306 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016308which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016309$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016310which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016311
Victor Stinnere0be4232011-10-25 13:06:09 +020016312 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016314 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16315 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016317 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318 ;;
16319 :H)
16320 #
16321 # CONFIG_HEADER
16322 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016324 {
16325 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016326 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16327 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016328 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016329 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016330 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16331$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016333 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016334 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016335 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 fi
16337 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016338 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016339 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016340 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016341 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344
16345 esac
16346
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016347
16348 case $ac_file$ac_mode in
16349 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16350
16351 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352done # for ac_tag
16353
Guido van Rossum627b2d71993-12-24 10:39:16 +000016354
Matthias Kloseb9621712010-04-24 17:59:49 +000016355as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016356_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016357ac_clean_files=$ac_clean_files_save
16358
Matthias Kloseb9621712010-04-24 17:59:49 +000016359test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016360 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016361
Martin v. Löwis11437992002-04-12 09:54:03 +000016362
16363# configure is writing to config.log, and then calls config.status.
16364# config.status does its own redirection, appending to config.log.
16365# Unfortunately, on DOS this fails, as config.log is still kept open
16366# by configure, so config.status won't be able to write to it; its
16367# output is simply discarded. So we exec the FD to /dev/null,
16368# effectively closing config.log, so it can be properly (re)opened and
16369# appended to by config.status. When coming back to configure, we
16370# need to make the FD available again.
16371if test "$no_create" != yes; then
16372 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016373 ac_config_status_args=
16374 test "$silent" = yes &&
16375 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016377 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 exec 5>>config.log
16379 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16380 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016382fi
16383if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16385$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016386fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016387
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016388
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016389echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016390if test ! -f Modules/Setup
16391then
16392 cp $srcdir/Modules/Setup.dist Modules/Setup
16393fi
16394
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016395echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016396if test ! -f Modules/Setup.local
16397then
16398 echo "# Edit this file for local setup changes" >Modules/Setup.local
16399fi
16400
16401echo "creating Makefile"
16402$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16403 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016404 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016405mv config.c Modules