blob: ce0c840dda460c123cf214d00acf3ee9839b6216 [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.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
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#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# 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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# 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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test 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 :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # 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.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # 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 ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_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'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000668ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100670MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000671INSTALL_DATA
672INSTALL_SCRIPT
673INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530674OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200675PYTHON
676ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200677ac_ct_READELF
678READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000679ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200680ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000681AR
682RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000683USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000684GNULD
685LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000687RUNSHARED
688INSTSONAME
689LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000690PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000691BLDLIBRARY
692DLLLIBRARY
693LDLIBRARY
694LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100695MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000696BUILDEXEEXT
697EGREP
698GREP
699CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200700NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000702MAINCC
703CXX
704OBJEXT
705EXEEXT
706ac_ct_CC
707CPPFLAGS
708LDFLAGS
709CFLAGS
710CC
711EXPORT_MACOSX_DEPLOYMENT_TARGET
712CONFIGURE_MACOSX_DEPLOYMENT_TARGET
713SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200714_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000715MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000716FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800718FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKALTINSTALLLAST
720FRAMEWORKALTINSTALLFIRST
721FRAMEWORKINSTALLLAST
722FRAMEWORKINSTALLFIRST
723PYTHONFRAMEWORKINSTALLDIR
724PYTHONFRAMEWORKPREFIX
725PYTHONFRAMEWORKDIR
726PYTHONFRAMEWORKIDENTIFIER
727PYTHONFRAMEWORK
728LIPO_32BIT_FLAGS
729ARCH_RUN_32BIT
730UNIVERSALSDK
731CONFIG_ARGS
732SOVERSION
733VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100735host_os
736host_vendor
737host_cpu
738host
739build_os
740build_vendor
741build_cpu
742build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500743HAS_HG
744HGBRANCH
745HGTAG
746HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400747BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000748target_alias
749host_alias
750build_alias
751LIBS
752ECHO_T
753ECHO_N
754ECHO_C
755DEFS
756mandir
757localedir
758libdir
759psdir
760pdfdir
761dvidir
762htmldir
763infodir
764docdir
765oldincludedir
766includedir
767localstatedir
768sharedstatedir
769sysconfdir
770datadir
771datarootdir
772libexecdir
773sbindir
774bindir
775program_transform_name
776prefix
777exec_prefix
778PACKAGE_URL
779PACKAGE_BUGREPORT
780PACKAGE_STRING
781PACKAGE_VERSION
782PACKAGE_TARNAME
783PACKAGE_NAME
784PATH_SEPARATOR
785SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000786ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_user_opts='
788enable_option_checking
789enable_universalsdk
790with_universal_archs
791with_framework_name
792enable_framework
793with_gcc
794with_cxx_main
795with_suffix
796enable_shared
797enable_profiling
798with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100799with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100800with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000801with_libs
802with_system_expat
803with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100804with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000805enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_dbmliborder
809with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_threads
811with_thread
812enable_ipv6
813with_doc_strings
814with_tsc
815with_pymalloc
816with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_fpectl
818with_libm
819with_libc
820enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800822with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000823'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100827MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200833CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000837ac_init_help=
838ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000839ac_unrecognized_opts=
840ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# The variables have the same names as the options, with
842# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846no_recursion=
847prefix=NONE
848program_prefix=NONE
849program_suffix=NONE
850program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855x_includes=NONE
856x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858# Installation directory options.
859# These are left unexpanded so users can "make install exec_prefix=/foo"
860# and all the variables that are supposed to be based on exec_prefix
861# by default will actually change.
862# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864bindir='${exec_prefix}/bin'
865sbindir='${exec_prefix}/sbin'
866libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867datarootdir='${prefix}/share'
868datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869sysconfdir='${prefix}/etc'
870sharedstatedir='${prefix}/com'
871localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872includedir='${prefix}/include'
873oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
875infodir='${datarootdir}/info'
876htmldir='${docdir}'
877dvidir='${docdir}'
878pdfdir='${docdir}'
879psdir='${docdir}'
880libdir='${exec_prefix}/lib'
881localedir='${datarootdir}/locale'
882mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 # If the previous option needs an argument, assign it.
889 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 ac_prev=
892 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200896 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
897 *=) ac_optarg= ;;
898 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Accept the important Cygnus configure options, so we can diagnose typos.
902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911
912 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200943 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
959
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
1011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 no_create=yes ;;
1060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
1114
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
1119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
1123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1125 ac_prev=sbindir ;;
1126 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1127 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129
1130 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1131 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1132 | --sharedst | --shareds | --shared | --share | --shar \
1133 | --sha | --sh)
1134 ac_prev=sharedstatedir ;;
1135 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1136 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1137 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1138 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 -site | --site | --sit)
1142 ac_prev=site ;;
1143 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1147 ac_prev=srcdir ;;
1148 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1152 | --syscon | --sysco | --sysc | --sys | --sy)
1153 ac_prev=sysconfdir ;;
1154 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1155 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1164 verbose=yes ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 -version | --version | --versio | --versi | --vers | -V)
1167 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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--with-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 --x)
1202 # Obsolete; use --with-x.
1203 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1206 | --x-incl | --x-inc | --x-in | --x-i)
1207 ac_prev=x_includes ;;
1208 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1209 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1213 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1214 ac_prev=x_libraries ;;
1215 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1216 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1220Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 ;;
1222
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 *=*)
1224 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 case $ac_envvar in #(
1227 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001228 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 export $ac_envvar ;;
1232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001238 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 ;;
1240
1241 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242done
1243
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247fi
1248
Matthias Kloseb9621712010-04-24 17:59:49 +00001249if test -n "$ac_unrecognized_opts"; then
1250 case $enable_option_checking in
1251 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1254 esac
1255fi
1256
1257# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1259 datadir sysconfdir sharedstatedir localstatedir includedir \
1260 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1261 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 # Remove trailing slashes.
1265 case $ac_val in
1266 */ )
1267 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1268 eval $ac_var=\$ac_val;;
1269 esac
1270 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 [\\/$]* | ?:[\\/]* ) continue;;
1273 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001276done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# There might be people who depend on the old broken behavior: `$host'
1279# used to hold the argument of --host etc.
1280# FIXME: To remove some day.
1281build=$build_alias
1282host=$host_alias
1283target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# FIXME: To remove some day.
1286if test "x$host_alias" != x; then
1287 if test "x$build_alias" = x; then
1288 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
1293
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
1298
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306
1307
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337 srcdir=..
1338 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001374\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001398 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428
1429 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001430
1431System types:
1432 --build=BUILD configure for building on BUILD [guessed]
1433 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435fi
1436
1437if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001439 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001440 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 cat <<\_ACEOF
1442
1443Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1446 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001447 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001448 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --enable-framework[=INSTALLDIR]
1450 Build (MacOSX|Darwin) framework
1451 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001452 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001453 --enable-loadable-sqlite-extensions
1454 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-ipv6 Enable ipv6 (with ipv4) support
1456 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001457 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460Optional Packages:
1461 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1462 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001463 --with-universal-archs=ARCH
1464 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001465 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001466 --with-framework-name=FRAMEWORK
1467 specify an alternate name of the framework built
1468 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001470 --with-cxx-main=<compiler>
1471 compile main() and link python executable with C++
1472 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with-suffix=.exe set executable suffix
1474 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001475 --with-hash-algorithm=[fnv|siphash24]
1476 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001477 --with-address-sanitizer
1478 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001480 --with-system-expat build pyexpat module using an installed expat
1481 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001482 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001483 --with-system-libmpdec build _decimal module using an installed libmpdec
1484 library
Ned Deilyd819b932013-09-06 01:07:05 -07001485 --with-tcltk-includes='-I...'
1486 override search for Tcl and Tk include files
1487 --with-tcltk-libs='-L...'
1488 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001489 --with-dbmliborder=db1:db2:...
1490 order to check db backends for dbm. Valid value is a
1491 colon separated string with the backend names
1492 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-threads[=DIRECTORY]
1495 disable/enable thread support
1496 --with(out)-thread[=DIRECTORY]
1497 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001499 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001501 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-fpectl enable SIGFPE catching
1503 --with-libm=STRING math library
1504 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001505 --with(out)-computed-gotos
1506 Use computed gotos in evaluation loop (enabled by
1507 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001508 --with(out)-ensurepip=[=upgrade]
1509 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
1511Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001512 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 CC C compiler command
1514 CFLAGS C compiler flags
1515 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1516 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CPP C preprocessor
1521
1522Use these variables to override the choices made by `configure' or to help
1523it to find libraries and programs with nonstandard names/locations.
1524
Georg Brandle2e15612009-05-20 18:25:10 +00001525Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001528fi
1529
1530if test "$ac_init_help" = "recursive"; then
1531 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 test -d "$ac_dir" ||
1534 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1535 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 ac_builddir=.
1537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538case "$ac_dir" in
1539.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001541 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001543 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 case $ac_top_builddir_sub in
1545 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1547 esac ;;
1548esac
1549ac_abs_top_builddir=$ac_pwd
1550ac_abs_builddir=$ac_pwd$ac_dir_suffix
1551# for backward compatibility:
1552ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$ac_top_builddir_sub
1558 ac_abs_top_srcdir=$ac_pwd ;;
1559 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 ac_top_srcdir=$srcdir
1562 ac_abs_top_srcdir=$srcdir ;;
1563 *) # Relative name.
1564 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1565 ac_top_srcdir=$ac_top_build_prefix$srcdir
1566 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001567esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 cd "$ac_dir" || { ac_status=$?; continue; }
1571 # Check for guested configure.
1572 if test -f "$ac_srcdir/configure.gnu"; then
1573 echo &&
1574 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1575 elif test -f "$ac_srcdir/configure"; then
1576 echo &&
1577 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 fi || ac_status=$?
1581 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 done
1583fi
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001586if $ac_init_version; then
1587 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001588python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001589generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001591Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592This configure script is free software; the Free Software Foundation
1593gives unlimited permission to copy, distribute and modify it.
1594_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001597
1598## ------------------------ ##
1599## Autoconf initialization. ##
1600## ------------------------ ##
1601
1602# ac_fn_c_try_compile LINENO
1603# --------------------------
1604# Try to compile conftest.$ac_ext, and return whether this succeeded.
1605ac_fn_c_try_compile ()
1606{
1607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1608 rm -f conftest.$ac_objext
1609 if { { ac_try="$ac_compile"
1610case "(($ac_try" in
1611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1612 *) ac_try_echo=$ac_try;;
1613esac
1614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1615$as_echo "$ac_try_echo"; } >&5
1616 (eval "$ac_compile") 2>conftest.err
1617 ac_status=$?
1618 if test -s conftest.err; then
1619 grep -v '^ *+' conftest.err >conftest.er1
1620 cat conftest.er1 >&5
1621 mv -f conftest.er1 conftest.err
1622 fi
1623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1624 test $ac_status = 0; } && {
1625 test -z "$ac_c_werror_flag" ||
1626 test ! -s conftest.err
1627 } && test -s conftest.$ac_objext; then :
1628 ac_retval=0
1629else
1630 $as_echo "$as_me: failed program was:" >&5
1631sed 's/^/| /' conftest.$ac_ext >&5
1632
1633 ac_retval=1
1634fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001635 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 as_fn_set_status $ac_retval
1637
1638} # ac_fn_c_try_compile
1639
Matthias Kloseb9621712010-04-24 17:59:49 +00001640# ac_fn_c_try_link LINENO
1641# -----------------------
1642# Try to link conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_link ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext conftest$ac_exeext
1647 if { { ac_try="$ac_link"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_link") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest$ac_exeext && {
1666 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001667 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
1676 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1677 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1678 # interfere with the next link command; also delete a directory that is
1679 # left behind by Apple's compiler. We do this before executing the actions.
1680 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_link
1685
Matthias Kloseb9621712010-04-24 17:59:49 +00001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001707 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
1723# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1724# -------------------------------------------------------
1725# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1726# the include files in INCLUDES and setting the cache variable VAR
1727# accordingly.
1728ac_fn_c_check_header_mongrel ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001731 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001734if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 $as_echo_n "(cached) " >&6
1736fi
1737eval ac_res=\$$3
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1739$as_echo "$ac_res" >&6; }
1740else
1741 # Is the header compilable?
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1743$as_echo_n "checking $2 usability... " >&6; }
1744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1745/* end confdefs.h. */
1746$4
1747#include <$2>
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750 ac_header_compiler=yes
1751else
1752 ac_header_compiler=no
1753fi
1754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1756$as_echo "$ac_header_compiler" >&6; }
1757
1758# Is the header present?
1759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1760$as_echo_n "checking $2 presence... " >&6; }
1761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762/* end confdefs.h. */
1763#include <$2>
1764_ACEOF
1765if ac_fn_c_try_cpp "$LINENO"; then :
1766 ac_header_preproc=yes
1767else
1768 ac_header_preproc=no
1769fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001770rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1772$as_echo "$ac_header_preproc" >&6; }
1773
1774# So? What about this header?
1775case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1776 yes:no: )
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1778$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1780$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1781 ;;
1782 no:yes:* )
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1784$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1786$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1788$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1790$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001793( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001794## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 ) | sed "s/^/$as_me: WARNING: /" >&2
1797 ;;
1798esac
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001801if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 $as_echo_n "(cached) " >&6
1803else
1804 eval "$3=\$ac_header_compiler"
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
1809fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001811
1812} # ac_fn_c_check_header_mongrel
1813
1814# ac_fn_c_try_run LINENO
1815# ----------------------
1816# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1817# that executables *can* be run.
1818ac_fn_c_try_run ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 if { { ac_try="$ac_link"
1822case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_link") 2>&5
1829 ac_status=$?
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1832 { { case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_try") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; }; }; then :
1842 ac_retval=0
1843else
1844 $as_echo "$as_me: program exited with status $ac_status" >&5
1845 $as_echo "$as_me: failed program was:" >&5
1846sed 's/^/| /' conftest.$ac_ext >&5
1847
1848 ac_retval=$ac_status
1849fi
1850 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 as_fn_set_status $ac_retval
1853
1854} # ac_fn_c_try_run
1855
1856# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1857# -------------------------------------------------------
1858# Tests whether HEADER exists and can be compiled using the include files in
1859# INCLUDES, setting the cache variable VAR accordingly.
1860ac_fn_c_check_header_compile ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1864$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001865if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001866 $as_echo_n "(cached) " >&6
1867else
1868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871#include <$2>
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 eval "$3=yes"
1875else
1876 eval "$3=no"
1877fi
1878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879fi
1880eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001884
1885} # ac_fn_c_check_header_compile
1886
Matthias Kloseb9621712010-04-24 17:59:49 +00001887# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1888# -------------------------------------------
1889# Tests whether TYPE exists after having included INCLUDES, setting cache
1890# variable VAR accordingly.
1891ac_fn_c_check_type ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001896if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 $as_echo_n "(cached) " >&6
1898else
1899 eval "$3=no"
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof ($2))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916int
1917main ()
1918{
1919if (sizeof (($2)))
1920 return 0;
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926
1927else
1928 eval "$3=yes"
1929fi
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931fi
1932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001938
1939} # ac_fn_c_check_type
1940
1941# ac_fn_c_find_uintX_t LINENO BITS VAR
1942# ------------------------------------
1943# Finds an unsigned integer type with width BITS, setting cache variable VAR
1944# accordingly.
1945ac_fn_c_find_uintX_t ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1949$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=no"
1954 # Order is important - never check a type that is potentially smaller
1955 # than half of the expected target width.
1956 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1957 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$ac_includes_default
1961int
1962main ()
1963{
1964static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001965test_array [0] = 0;
1966return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973 case $ac_type in #(
1974 uint$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001981 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983else
1984 break
1985fi
1986 done
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_find_uintX_t
1994
1995# ac_fn_c_find_intX_t LINENO BITS VAR
1996# -----------------------------------
1997# Finds a signed integer type with width BITS, setting cache variable VAR
1998# accordingly.
1999ac_fn_c_find_intX_t ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2003$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002004if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005 $as_echo_n "(cached) " >&6
2006else
2007 eval "$3=no"
2008 # Order is important - never check a type that is potentially smaller
2009 # than half of the expected target width.
2010 for ac_type in int$2_t 'int' 'long int' \
2011 'long long int' 'short int' 'signed char'; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002016int
2017main ()
2018{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002019static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002032int
2033main ()
2034{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002035static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002036 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045
2046else
2047 case $ac_type in #(
2048 int$2_t) :
2049 eval "$3=yes" ;; #(
2050 *) :
2051 eval "$3=\$ac_type" ;;
2052esac
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002057 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059else
2060 break
2061fi
2062 done
2063fi
2064eval ac_res=\$$3
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2066$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002067 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069} # ac_fn_c_find_intX_t
2070
2071# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2072# --------------------------------------------
2073# Tries to find the compile-time value of EXPR in a program that includes
2074# INCLUDES, setting VAR accordingly. Returns whether the value could be
2075# computed
2076ac_fn_c_compute_int ()
2077{
2078 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079 if test "$cross_compiling" = yes; then
2080 # Depending upon the size, compute the lo and hi bounds.
2081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002088test_array [0] = 0;
2089return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=0 ac_mid=0
2097 while :; do
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_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=$ac_mid; break
2114else
2115 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2116 if test $ac_lo -le $ac_mid; then
2117 ac_lo= ac_hi=
2118 break
2119 fi
2120 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 done
2124else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002132test_array [0] = 0;
2133return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002134
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=-1 ac_mid=-1
2141 while :; do
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002149test_array [0] = 0;
2150return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 ac_lo=$ac_mid; break
2158else
2159 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2160 if test $ac_mid -le $ac_hi; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
2168else
2169 ac_lo= ac_hi=
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174# Binary search between lo and hi bounds.
2175while test "x$ac_lo" != "x$ac_hi"; do
2176 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002184test_array [0] = 0;
2185return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002186
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=$ac_mid
2193else
2194 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197done
2198case $ac_lo in #((
2199?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2200'') ac_retval=1 ;;
2201esac
2202 else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206static long int longval () { return $2; }
2207static unsigned long int ulongval () { return $2; }
2208#include <stdio.h>
2209#include <stdlib.h>
2210int
2211main ()
2212{
2213
2214 FILE *f = fopen ("conftest.val", "w");
2215 if (! f)
2216 return 1;
2217 if (($2) < 0)
2218 {
2219 long int i = longval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%ld", i);
2223 }
2224 else
2225 {
2226 unsigned long int i = ulongval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%lu", i);
2230 }
2231 /* Do not output a trailing newline, as this causes \r\n confusion
2232 on some platforms. */
2233 return ferror (f) || fclose (f) != 0;
2234
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_run "$LINENO"; then :
2240 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2241else
2242 ac_retval=1
2243fi
2244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2245 conftest.$ac_objext conftest.beam conftest.$ac_ext
2246rm -f conftest.val
2247
2248 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 as_fn_set_status $ac_retval
2251
2252} # ac_fn_c_compute_int
2253
2254# ac_fn_c_check_func LINENO FUNC VAR
2255# ----------------------------------
2256# Tests whether FUNC exists, setting the cache variable VAR accordingly
2257ac_fn_c_check_func ()
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002262if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002263 $as_echo_n "(cached) " >&6
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2269#define $2 innocuous_$2
2270
2271/* System header to define __stub macros and hopefully few prototypes,
2272 which can conflict with char $2 (); below.
2273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2274 <limits.h> exists even on freestanding compilers. */
2275
2276#ifdef __STDC__
2277# include <limits.h>
2278#else
2279# include <assert.h>
2280#endif
2281
2282#undef $2
2283
2284/* Override any GCC internal prototype to avoid an error.
2285 Use char because int might match the return type of a GCC
2286 builtin and then its argument prototype would still apply. */
2287#ifdef __cplusplus
2288extern "C"
2289#endif
2290char $2 ();
2291/* The GNU C library defines this for functions which it implements
2292 to always fail with ENOSYS. Some functions are actually named
2293 something starting with __ and the normal name is an alias. */
2294#if defined __stub_$2 || defined __stub___$2
2295choke me
2296#endif
2297
2298int
2299main ()
2300{
2301return $2 ();
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_link "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext \
2312 conftest$ac_exeext conftest.$ac_ext
2313fi
2314eval ac_res=\$$3
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002317 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002318
2319} # ac_fn_c_check_func
2320
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002321# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2322# ---------------------------------------------
2323# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2324# accordingly.
2325ac_fn_c_check_decl ()
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 as_decl_name=`echo $2|sed 's/ *(.*//'`
2329 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2331$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2332if eval \${$3+:} false; then :
2333 $as_echo_n "(cached) " >&6
2334else
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$4
2338int
2339main ()
2340{
2341#ifndef $as_decl_name
2342#ifdef __cplusplus
2343 (void) $as_decl_use;
2344#else
2345 (void) $as_decl_name;
2346#endif
2347#endif
2348
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$3=yes"
2355else
2356 eval "$3=no"
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360eval ac_res=\$$3
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2362$as_echo "$ac_res" >&6; }
2363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364
2365} # ac_fn_c_check_decl
2366
Matthias Kloseb9621712010-04-24 17:59:49 +00002367# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2368# ----------------------------------------------------
2369# Tries to find if the field MEMBER exists in type AGGR, after including
2370# INCLUDES, setting cache variable VAR accordingly.
2371ac_fn_c_check_member ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2375$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002376if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo_n "(cached) " >&6
2378else
2379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380/* end confdefs.h. */
2381$5
2382int
2383main ()
2384{
2385static $2 ac_aggr;
2386if (ac_aggr.$3)
2387return 0;
2388 ;
2389 return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"; then :
2393 eval "$4=yes"
2394else
2395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2396/* end confdefs.h. */
2397$5
2398int
2399main ()
2400{
2401static $2 ac_aggr;
2402if (sizeof ac_aggr.$3)
2403return 0;
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409 eval "$4=yes"
2410else
2411 eval "$4=no"
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416fi
2417eval ac_res=\$$4
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002420 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002421
2422} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002424This file contains any messages produced by compilers while
2425running configure, to aid debugging if configure makes a mistake.
2426
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002427It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002428generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002429
2430 $ $0 $@
2431
2432_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002434{
2435cat <<_ASUNAME
2436## --------- ##
2437## Platform. ##
2438## --------- ##
2439
2440hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2441uname -m = `(uname -m) 2>/dev/null || echo unknown`
2442uname -r = `(uname -r) 2>/dev/null || echo unknown`
2443uname -s = `(uname -s) 2>/dev/null || echo unknown`
2444uname -v = `(uname -v) 2>/dev/null || echo unknown`
2445
2446/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2447/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2448
2449/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2450/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2451/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002453/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2454/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2455/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2456
2457_ASUNAME
2458
2459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2460for as_dir in $PATH
2461do
2462 IFS=$as_save_IFS
2463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 $as_echo "PATH: $as_dir"
2465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468} >&5
2469
2470cat >&5 <<_ACEOF
2471
2472
2473## ----------- ##
2474## Core tests. ##
2475## ----------- ##
2476
2477_ACEOF
2478
2479
2480# Keep a trace of the command line.
2481# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002482# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002483# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002485ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002486ac_configure_args0=
2487ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002488ac_must_keep_next=false
2489for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002490do
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 for ac_arg
2492 do
2493 case $ac_arg in
2494 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2495 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2496 | -silent | --silent | --silen | --sile | --sil)
2497 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 esac
2501 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002506 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002508 case $ac_arg in
2509 *=* | --config-cache | -C | -disable-* | --disable-* \
2510 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2511 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2512 | -with-* | --with-* | -without-* | --without-* | --x)
2513 case "$ac_configure_args0 " in
2514 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2515 esac
2516 ;;
2517 -* ) ac_must_keep_next=true ;;
2518 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ;;
2522 esac
2523 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002524done
Matthias Kloseb9621712010-04-24 17:59:49 +00002525{ ac_configure_args0=; unset ac_configure_args0;}
2526{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002527
2528# When interrupted or exit'd, cleanup temporary files, and complete
2529# config.log. We remove comments because anyway the quotes in there
2530# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531# WARNING: Use '\'' to represent an apostrophe within the trap.
2532# 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 +00002533trap 'exit_status=$?
2534 # Save into config.log some information that might help in debugging.
2535 {
2536 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002537
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002539## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
2542 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543(
2544 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2545 eval ac_val=\$$ac_var
2546 case $ac_val in #(
2547 *${as_nl}*)
2548 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2550$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac
2552 case $ac_var in #(
2553 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2555 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac ;;
2557 esac
2558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2561 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 "s/'\''/'\''\\\\'\'''\''/g;
2564 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2565 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002566 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002568 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 esac |
2570 sort
2571)
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002575## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_vars
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587
2588 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002592 echo
2593 for ac_var in $ac_subst_files
2594 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 eval ac_val=\$$ac_var
2596 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002600 done | sort
2601 echo
2602 fi
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002605 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002606## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
2611 fi
2612 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 $as_echo "$as_me: caught signal $ac_signal"
2614 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 rm -f core *.core core.conftest.* &&
2617 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002620for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002622done
2623ac_signal=0
2624
2625# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002627
Matthias Kloseb9621712010-04-24 17:59:49 +00002628$as_echo "/* confdefs.h */" > confdefs.h
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630# Predefined preprocessor variables.
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_NAME "$PACKAGE_NAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_VERSION "$PACKAGE_VERSION"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_STRING "$PACKAGE_STRING"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2650_ACEOF
2651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_URL "$PACKAGE_URL"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656
2657# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658# Prefer an explicitly selected file to automatically selected ones.
2659ac_site_file1=NONE
2660ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002662 # We do not want a PATH search for config.site.
2663 case $CONFIG_SITE in #((
2664 -*) ac_site_file1=./$CONFIG_SITE;;
2665 */*) ac_site_file1=$CONFIG_SITE;;
2666 *) ac_site_file1=./$CONFIG_SITE;;
2667 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 ac_site_file1=$prefix/share/config.site
2670 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671else
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 ac_site_file1=$ac_default_prefix/share/config.site
2673 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676do
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 test "x$ac_site_file" = xNONE && continue
2678 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2680$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 . "$ac_site_file" \
2683 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002686See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687 fi
2688done
2689
2690if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 # Some versions of bash will fail to source /dev/null (special files
2692 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2693 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2695$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2698 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 esac
2700 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701else
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2703$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 >$cache_file
2705fi
2706
2707# Check that the precious variables saved in the cache have kept the same
2708# value.
2709ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2712 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2714 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 case $ac_old_set,$ac_new_set in
2716 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2718$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 +00002719 ac_cache_corrupted=: ;;
2720 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2722$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 ac_cache_corrupted=: ;;
2724 ,);;
2725 *)
2726 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # differences in whitespace do not lead to failure.
2728 ac_old_val_w=`echo x $ac_old_val`
2729 ac_new_val_w=`echo x $ac_new_val`
2730 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2732$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2733 ac_cache_corrupted=:
2734 else
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2736$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2737 eval $ac_var=\$ac_old_val
2738 fi
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2740$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2742$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 fi;;
2744 esac
2745 # Pass precious variables to config.status.
2746 if test "$ac_new_set" = set; then
2747 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 *) ac_arg=$ac_var=$ac_new_val ;;
2750 esac
2751 case " $ac_configure_args " in
2752 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 esac
2755 fi
2756done
2757if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2761$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002762 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002764## -------------------- ##
2765## Main body of script. ##
2766## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767
Guido van Rossum7f43da71994-08-01 12:15:30 +00002768ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2772ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773
Guido van Rossum627b2d71993-12-24 10:39:16 +00002774
Michael W. Hudson54241132001-12-07 15:38:26 +00002775
Trent Nelson4d4ec652012-10-16 08:51:24 -04002776
Trent Nelson5595ab52012-10-17 04:47:31 -04002777if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002778 # If we're building out-of-tree, we need to make sure the following
2779 # resources get picked up before their $srcdir counterparts.
2780 # Objects/ -> typeslots.inc
2781 # Include/ -> Python-ast.h, graminit.h
2782 # Python/ -> importlib.h
2783 # (A side effect of this is that these resources will automatically be
2784 # regenerated when building out-of-tree, regardless of whether or not
2785 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2786 # off.)
2787 BASECPPFLAGS="-IObjects -IInclude -IPython"
2788else
2789 BASECPPFLAGS=""
2790fi
2791
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792
2793
2794
2795
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002796if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797then
2798# Extract the first word of "hg", so it can be a program name with args.
2799set dummy hg; ac_word=$2
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002802if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803 $as_echo_n "(cached) " >&6
2804else
2805 if test -n "$HAS_HG"; then
2806 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2807else
2808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2809for as_dir in $PATH
2810do
2811 IFS=$as_save_IFS
2812 test -z "$as_dir" && as_dir=.
2813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 ac_cv_prog_HAS_HG="found"
2816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2817 break 2
2818 fi
2819done
2820 done
2821IFS=$as_save_IFS
2822
2823 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2824fi
2825fi
2826HAS_HG=$ac_cv_prog_HAS_HG
2827if test -n "$HAS_HG"; then
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2829$as_echo "$HAS_HG" >&6; }
2830else
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2832$as_echo "no" >&6; }
2833fi
2834
2835
2836else
2837HAS_HG=no-repository
2838fi
2839if test $HAS_HG = found
2840then
2841 HGVERSION="hg id -i \$(srcdir)"
2842 HGTAG="hg id -t \$(srcdir)"
2843 HGBRANCH="hg id -b \$(srcdir)"
2844else
2845 HGVERSION=""
2846 HGTAG=""
2847 HGBRANCH=""
2848fi
2849
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
2853
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002854ac_aux_dir=
2855for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2856 if test -f "$ac_dir/install-sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install-sh -c"
2859 break
2860 elif test -f "$ac_dir/install.sh"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/install.sh -c"
2863 break
2864 elif test -f "$ac_dir/shtool"; then
2865 ac_aux_dir=$ac_dir
2866 ac_install_sh="$ac_aux_dir/shtool install -c"
2867 break
2868 fi
2869done
2870if test -z "$ac_aux_dir"; then
2871 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2872fi
2873
2874# These three variables are undocumented and unsupported,
2875# and are intended to be withdrawn in a future Autoconf release.
2876# They can cause serious problems if a builder's source tree is in a directory
2877# whose full name contains unusual characters.
2878ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2879ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2880ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2881
2882
2883# Make sure we can run config.sub.
2884$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2885 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2888$as_echo_n "checking build system type... " >&6; }
2889if ${ac_cv_build+:} false; then :
2890 $as_echo_n "(cached) " >&6
2891else
2892 ac_build_alias=$build_alias
2893test "x$ac_build_alias" = x &&
2894 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2895test "x$ac_build_alias" = x &&
2896 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2897ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2898 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899
2900fi
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2902$as_echo "$ac_cv_build" >&6; }
2903case $ac_cv_build in
2904*-*-*) ;;
2905*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2906esac
2907build=$ac_cv_build
2908ac_save_IFS=$IFS; IFS='-'
2909set x $ac_cv_build
2910shift
2911build_cpu=$1
2912build_vendor=$2
2913shift; shift
2914# Remember, the first character of IFS is used to create $*,
2915# except with old shells:
2916build_os=$*
2917IFS=$ac_save_IFS
2918case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919
2920
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2922$as_echo_n "checking host system type... " >&6; }
2923if ${ac_cv_host+:} false; then :
2924 $as_echo_n "(cached) " >&6
2925else
2926 if test "x$host_alias" = x; then
2927 ac_cv_host=$ac_cv_build
2928else
2929 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2930 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931fi
2932
2933fi
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2935$as_echo "$ac_cv_host" >&6; }
2936case $ac_cv_host in
2937*-*-*) ;;
2938*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2939esac
2940host=$ac_cv_host
2941ac_save_IFS=$IFS; IFS='-'
2942set x $ac_cv_host
2943shift
2944host_cpu=$1
2945host_vendor=$2
2946shift; shift
2947# Remember, the first character of IFS is used to create $*,
2948# except with old shells:
2949host_os=$*
2950IFS=$ac_save_IFS
2951case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952
2953
2954
doko@python.orga10e4a92013-01-25 18:45:12 +01002955
2956
Ned Deilyfcbc2462014-08-22 13:32:49 -07002957# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2958rm -f pybuilddir.txt
2959
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002960if test "$cross_compiling" = yes; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2962$as_echo_n "checking for python interpreter for cross build... " >&6; }
2963 if test -z "$PYTHON_FOR_BUILD"; then
2964 for interp in python$PACKAGE_VERSION python3 python; do
2965 which $interp >/dev/null 2>&1 || continue
2966 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2967 break
2968 fi
2969 interp=
2970 done
2971 if test x$interp = x; then
2972 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2975$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002976 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002977 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002978elif test "$cross_compiling" = maybe; then
2979 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980else
2981 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2982fi
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Benjamin Petersond23f8222009-04-05 19:13:16 +00002986if test "$prefix" != "/"; then
2987 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002993# We don't use PACKAGE_ variables, and they cause conflicts
2994# with other autoconf-based packages that include Python.h
2995grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2996rm confdefs.h
2997mv confdefs.h.new confdefs.h
2998
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002999
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003000VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003001
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003002# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003003
3004SOVERSION=1.0
3005
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006# The later defininition of _XOPEN_SOURCE disables certain features
3007# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
3011
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017
3018
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024
3025
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3027# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003030
3031
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3034# them.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038
3039
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003040define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003041
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003042# Arguments passed to configure.
3043
3044CONFIG_ARGS="$ac_configure_args"
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3047$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003049if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 case $enableval in
3052 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053 # Locate the best usable SDK, see Mac/README.txt for more
3054 # information
3055 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003056 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3059 if test ! -d "${enableval}"
3060 then
3061 enableval=/
3062 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 ;;
3065 esac
3066 case $enableval in
3067 no)
3068 UNIVERSALSDK=
3069 enable_universalsdk=
3070 ;;
3071 *)
3072 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 if test ! -d "${UNIVERSALSDK}"
3074 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003075 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 ;;
3078 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081else
3082
3083 UNIVERSALSDK=
3084 enable_universalsdk=
3085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088if test -n "${UNIVERSALSDK}"
3089then
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3091$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092else
Matthias Kloseb9621712010-04-24 17:59:49 +00003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deily87adb6e2013-10-18 21:09:56 -07003099ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101# For backward compatibility reasons we prefer to select '32-bit' if available,
3102# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003104if test "`uname -s`" = "Darwin"
3105then
3106 if test -n "${UNIVERSALSDK}"
3107 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003108 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109 then
3110 UNIVERSAL_ARCHS="intel"
3111 fi
3112 fi
3113fi
3114
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3117$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
3119# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122 UNIVERSAL_ARCHS="$withval"
3123
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124fi
3125
Ned Deily87adb6e2013-10-18 21:09:56 -07003126if test -n "${UNIVERSALSDK}"
3127then
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3129$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3130else
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3132$as_echo "no" >&6; }
3133fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003135
3136# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003137if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003138 withval=$with_framework_name;
3139 PYTHONFRAMEWORK=${withval}
3140 PYTHONFRAMEWORKDIR=${withval}.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3142
3143else
3144
3145 PYTHONFRAMEWORK=Python
3146 PYTHONFRAMEWORKDIR=Python.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3148
3149fi
3150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003152if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003154 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003155 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003156 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 esac
3158 case $enableval in
3159 no)
3160 PYTHONFRAMEWORK=
3161 PYTHONFRAMEWORKDIR=no-framework
3162 PYTHONFRAMEWORKPREFIX=
3163 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164 FRAMEWORKINSTALLFIRST=
3165 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003166 FRAMEWORKALTINSTALLFIRST=
3167 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003168 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003169 if test "x${prefix}" = "xNONE"; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003175 ;;
3176 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003180 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003181 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3182 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003183 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186 if test "x${prefix}" = "xNONE" ; then
3187 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 else
3190 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3191 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003192
3193 case "${enableval}" in
3194 /System*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 if test "${prefix}" = "NONE" ; then
3197 # See below
3198 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3199 fi
3200 ;;
3201
3202 /Library*)
3203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3204 ;;
3205
3206 */Library/Frameworks)
3207 MDIR="`dirname "${enableval}"`"
3208 MDIR="`dirname "${MDIR}"`"
3209 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3210
3211 if test "${prefix}" = "NONE"; then
3212 # User hasn't specified the
3213 # --prefix option, but wants to install
3214 # the framework in a non-default location,
3215 # ensure that the compatibility links get
3216 # installed relative to that prefix as well
3217 # instead of in /usr/local.
3218 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3219 fi
3220 ;;
3221
3222 *)
3223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3224 ;;
3225 esac
3226
Jack Jansen127e56e2001-09-11 14:41:54 +00003227 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3236
3237 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Guido van Rossum563e7081996-09-10 18:20:48 +00003241else
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003244 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORKPREFIX=
3246 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247 FRAMEWORKINSTALLFIRST=
3248 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003249 FRAMEWORKALTINSTALLFIRST=
3250 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003251 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003252 if test "x${prefix}" = "xNONE" ; then
3253 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3254 else
3255 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3256 fi
Jack Jansene578a632001-08-15 01:27:14 +00003257 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260fi
3261
Thomas Wouters477c8d52006-05-27 19:21:47 +00003262
3263
Michael W. Hudson54241132001-12-07 15:38:26 +00003264
3265
3266
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269
3270
3271
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003272
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003273
Ned Deilyb8f944f2013-11-21 22:42:25 -08003274
Jack Jansene578a632001-08-15 01:27:14 +00003275##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003276## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003277## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279# Set name for machine-dependent library files
3280
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3282$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283if test -z "$MACHDEP"
3284then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 # avoid using uname for cross builds
3286 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003287 # ac_sys_system and ac_sys_release are used for setting
3288 # a lot of different things including 'define_xopen_source'
3289 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case "$host" in
3291 *-*-linux*)
3292 ac_sys_system=Linux
3293 ;;
3294 *-*-cygwin*)
3295 ac_sys_system=Cygwin
3296 ;;
3297 *)
3298 # for now, limit cross builds to known configurations
3299 MACHDEP="unknown"
3300 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3301 esac
3302 ac_sys_release=
3303 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003304 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003305 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003306 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003307 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 fi
3312 ac_md_system=`echo $ac_sys_system |
3313 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3314 ac_md_release=`echo $ac_sys_release |
3315 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3316 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003317
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003318 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003319 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003320 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003321 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003322 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003323 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325fi
Guido van Rossum91922671997-10-09 20:24:13 +00003326
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327
3328if test "$cross_compiling" = yes; then
3329 case "$host" in
3330 *-*-linux*)
3331 case "$host_cpu" in
3332 arm*)
3333 _host_cpu=arm
3334 ;;
3335 *)
3336 _host_cpu=$host_cpu
3337 esac
3338 ;;
3339 *-*-cygwin*)
3340 _host_cpu=
3341 ;;
3342 *)
3343 # for now, limit cross builds to known configurations
3344 MACHDEP="unknown"
3345 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3346 esac
3347 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3348fi
3349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003350# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3351# disable features if it is defined, without any means to access these
3352# features as extensions. For these systems, we skip the definition of
3353# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3354# some feature, make sure there is no alternative way to access this
3355# feature. Also, when using wildcards, make sure you have verified the
3356# need for not defining _XOPEN_SOURCE on all systems matching the
3357# wildcard, and that the wildcard does not include future systems
3358# (which may remove their limitations).
3359case $ac_sys_system/$ac_sys_release in
3360 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3361 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003362 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003363 # In addition, Stefan Krah confirms that issue #1244610 exists through
3364 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003365 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003366 define_xopen_source=no
3367 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3368 # also defined. This can be overridden by defining _BSD_SOURCE
3369 # As this has a different meaning on Linux, only define it on OpenBSD
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003372
3373 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003374 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003375 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3376 # also defined. This can be overridden by defining _BSD_SOURCE
3377 # As this has a different meaning on Linux, only define it on OpenBSD
3378
Matthias Kloseb9621712010-04-24 17:59:49 +00003379$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003380
3381 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003382 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3383 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3384 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003385 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 +00003386 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003387 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3388 # request to enable features supported by the standard as a request
3389 # to disable features not supported by the standard. The best way
3390 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3391 # entirely and define __EXTENSIONS__ instead.
3392 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003393 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3395 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003396 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003397 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003398 define_xopen_source=no;;
3399 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003400 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003402 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003403 # On FreeBSD 4, the math functions C89 does not cover are never defined
3404 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3405 FreeBSD/4.*)
3406 define_xopen_source=no;;
3407 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3408 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3409 # identifies itself as Darwin/7.*
3410 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3411 # disables platform specific features beyond repair.
3412 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3413 # has no effect, don't bother defining them
3414 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003415 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003416 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003417 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003418 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3419 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3420 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003421 AIX/4)
3422 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003423 AIX/5)
3424 if test `uname -r` -eq 1; then
3425 define_xopen_source=no
3426 fi
3427 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003428 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3429 # defining NI_NUMERICHOST.
3430 QNX/6.3.2)
3431 define_xopen_source=no
3432 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434esac
3435
3436if test $define_xopen_source = yes
3437then
Victor Stinner14d098d2011-09-07 22:29:43 +02003438 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Victor Stinner14d098d2011-09-07 22:29:43 +02003440$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3444 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3445 # several APIs are not declared. Since this is also needed in some
3446 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003447
Matthias Kloseb9621712010-04-24 17:59:49 +00003448$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
3450
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003452$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003454fi
3455
Christian Heimes647cd872013-12-07 23:39:33 +01003456# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3457case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003458 hp*|HP*)
3459 define_stdc_a1=yes;;
3460 *)
3461 define_stdc_a1=no;;
3462esac
3463
3464if test $define_stdc_a1 = yes
3465then
Christian Heimes647cd872013-12-07 23:39:33 +01003466
3467$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3468
Christian Heimesb02bcae2013-12-08 15:21:08 +01003469fi
Christian Heimes647cd872013-12-07 23:39:33 +01003470
Guido van Rossum91922671997-10-09 20:24:13 +00003471#
3472# SGI compilers allow the specification of the both the ABI and the
3473# ISA on the command line. Depending on the values of these switches,
3474# different and often incompatable code will be generated.
3475#
3476# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3477# thus supply support for various ABI/ISA combinations. The MACHDEP
3478# variable is also adjusted.
3479#
3480
3481if test ! -z "$SGI_ABI"
3482then
3483 CC="cc $SGI_ABI"
3484 LDFLAGS="$SGI_ABI $LDFLAGS"
3485 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3488$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3491# it may influence the way we can build extensions, so distutils
3492# needs to check it
3493
Thomas Wouters477c8d52006-05-27 19:21:47 +00003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003496EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003497
Guido van Rossum627b2d71993-12-24 10:39:16 +00003498# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003499
3500# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3501# for debug/optimization stuff. BASECFLAGS is for flags that are required
3502# just to get things to compile and link. Users are free to override OPT
3503# when running configure or make. The build should not break if they do.
3504# BASECFLAGS should generally not be messed with, however.
3505
3506# XXX shouldn't some/most/all of this code be merged with the stuff later
3507# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3509$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003511# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003512if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003515 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003516 without_gcc=yes;;
3517 yes) CC=gcc
3518 without_gcc=no;;
3519 *) CC=$withval
3520 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003521 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003522else
Martin v. Löwis11437992002-04-12 09:54:03 +00003523
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003524 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003525 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003526 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003527 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003528 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529fi
3530
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3532$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003533
Guido van Rossum8b131c51995-03-09 14:10:13 +00003534# If the user switches compilers, we can't believe the cache
3535if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3536then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003537 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003538(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539fi
3540
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003541# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3542# when the compiler supports them, but we don't always want -O2, and
3543# we set -g later.
3544if test -z "$CFLAGS"; then
3545 CFLAGS=
3546fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547
3548if test "$ac_sys_system" = "Darwin"
3549then
3550 # Compiler selection on MacOSX is more complicated than
3551 # AC_PROG_CC can handle, see Mac/README.txt for more
3552 # information
3553 if test -z "${CC}"
3554 then
3555 found_gcc=
3556 found_clang=
3557 as_save_IFS=$IFS; IFS=:
3558 for as_dir in $PATH
3559 do
3560 IFS=$as_save_IFS
3561 if test -x $as_dir/gcc; then
3562 if test -z "${found_gcc}"; then
3563 found_gcc=$as_dir/gcc
3564 fi
3565 fi
3566 if test -x $as_dir/clang; then
3567 if test -z "${found_clang}"; then
3568 found_clang=$as_dir/clang
3569 fi
3570 fi
3571 done
3572 IFS=$as_save_IFS
3573
3574 if test -n "$found_gcc" -a -n "$found_clang"
3575 then
3576 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3577 then
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3579$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3580 CC="$found_clang"
3581 CXX="$found_clang++"
3582 fi
3583
3584
3585 elif test -z "$found_gcc" -a -n "$found_clang"
3586 then
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3588$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3589 CC="$found_clang"
3590 CXX="$found_clang++"
3591
3592 elif test -z "$found_gcc" -a -z "$found_clang"
3593 then
3594 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3595 if test -n "${found_clang}"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3598$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3599 CC="${found_clang}"
3600 CXX="`/usr/bin/xcrun -find clang++`"
3601
3602 # else: use default behaviour
3603 fi
3604 fi
3605 fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607ac_ext=c
3608ac_cpp='$CPP $CPPFLAGS'
3609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3611ac_compiler_gnu=$ac_cv_c_compiler_gnu
3612if test -n "$ac_tool_prefix"; then
3613 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3614set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003617if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003619else
3620 if test -n "$CC"; then
3621 ac_cv_prog_CC="$CC" # Let the user override the test.
3622else
Martin v. Löwis11437992002-04-12 09:54:03 +00003623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $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 +00003632 break 2
3633 fi
3634done
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003637
Jack Jansendd19cf82001-12-06 22:36:17 +00003638fi
3639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003641if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3643$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651if test -z "$ac_cv_prog_CC"; then
3652 ac_ct_CC=$CC
3653 # Extract the first word of "gcc", so it can be a program name with args.
3654set dummy gcc; 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_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
3660 if test -n "$ac_ct_CC"; then
3661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3662else
3663as_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
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003669 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_ac_ct_CC="gcc"
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
3680ac_ct_CC=$ac_cv_prog_ac_ct_CC
3681if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3683$as_echo "$ac_ct_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 if test "x$ac_ct_CC" = x; then
3690 CC=""
3691 else
3692 case $cross_compiling:$ac_tool_warned in
3693yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696ac_tool_warned=yes ;;
3697esac
3698 CC=$ac_ct_CC
3699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
3701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003702fi
3703
Jack Jansendd19cf82001-12-06 22:36:17 +00003704if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705 if test -n "$ac_tool_prefix"; then
3706 # 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 +00003707set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003710if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003712else
3713 if test -n "$CC"; then
3714 ac_cv_prog_CC="$CC" # Let the user override the test.
3715else
Martin v. Löwis11437992002-04-12 09:54:03 +00003716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717for as_dir in $PATH
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
3731fi
3732fi
3733CC=$ac_cv_prog_CC
3734if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3736$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3739$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745if test -z "$CC"; then
3746 # Extract the first word of "cc", so it can be a program name with args.
3747set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003750if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
3753 if test -n "$CC"; then
3754 ac_cv_prog_CC="$CC" # Let the user override the test.
3755else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758for as_dir in $PATH
3759do
3760 IFS=$as_save_IFS
3761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3765 ac_prog_rejected=yes
3766 continue
3767 fi
3768 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $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 +00003770 break 2
3771 fi
3772done
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003775
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test $ac_prog_rejected = yes; then
3777 # We found a bogon in the path, so make sure we never use it.
3778 set dummy $ac_cv_prog_CC
3779 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003781 # We chose a different compiler from the bogus one.
3782 # However, it has the same basename, so the bogon will be chosen
3783 # first if we set CC to just the basename; use the full file name.
3784 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003785 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786 fi
3787fi
3788fi
3789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3793$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801if test -z "$CC"; then
3802 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 do
3805 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3808$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003809if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003811else
3812 if test -n "$CC"; then
3813 ac_cv_prog_CC="$CC" # Let the user override the test.
3814else
Martin v. Löwis11437992002-04-12 09:54:03 +00003815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816for as_dir in $PATH
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $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 +00003824 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826done
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830fi
3831fi
3832CC=$ac_cv_prog_CC
3833if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3835$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836else
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003839fi
3840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 test -n "$CC" && break
3843 done
3844fi
3845if test -z "$CC"; then
3846 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003848do
3849 # Extract the first word of "$ac_prog", so it can be a program name with args.
3850set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003853if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
3856 if test -n "$ac_ct_CC"; then
3857 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3858else
3859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 $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 +00003868 break 2
3869 fi
3870done
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874fi
3875fi
3876ac_ct_CC=$ac_cv_prog_ac_ct_CC
3877if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3879$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880else
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3882$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 test -n "$ac_ct_CC" && break
3887done
Michael W. Hudson54241132001-12-07 15:38:26 +00003888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 if test "x$ac_ct_CC" = x; then
3890 CC=""
3891 else
3892 case $cross_compiling:$ac_tool_warned in
3893yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896ac_tool_warned=yes ;;
3897esac
3898 CC=$ac_ct_CC
3899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003900fi
3901
3902fi
3903
3904
Matthias Kloseb9621712010-04-24 17:59:49 +00003905test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003907as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003908See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
3910# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003911$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3912set X $ac_compile
3913ac_compiler=$2
3914for ac_option in --version -v -V -qversion; do
3915 { { ac_try="$ac_compiler $ac_option >&5"
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
3922 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 if test -s conftest.err; then
3925 sed '10a\
3926... rest of stderr output deleted ...
3927 10q' conftest.err >conftest.er1
3928 cat conftest.er1 >&5
3929 fi
3930 rm -f conftest.er1 conftest.err
3931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }
3933done
Martin v. Löwis11437992002-04-12 09:54:03 +00003934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003936/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003937
Martin v. Löwis11437992002-04-12 09:54:03 +00003938int
3939main ()
3940{
3941
3942 ;
3943 return 0;
3944}
3945_ACEOF
3946ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003947ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003948# Try to create an executable without -o first, disregard a.out.
3949# It will help us diagnose broken compilers, and finding out an intuition
3950# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3952$as_echo_n "checking whether the C compiler works... " >&6; }
3953ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3954
3955# The possible output files:
3956ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_rmfiles=
3959for ac_file in $ac_files
3960do
3961 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3964 esac
3965done
3966rm -f $ac_rmfiles
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969case "(($ac_try" in
3970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971 *) ac_try_echo=$ac_try;;
3972esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3974$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3980# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3981# in a Makefile. We should not override ac_cv_exeext if it was cached,
3982# so that the user can short-circuit this test for compilers unknown to
3983# Autoconf.
3984for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003985do
3986 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 ;;
3990 [ab].out )
3991 # We found the default executable, but exeext='' is most
3992 # certainly right.
3993 break;;
3994 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 then :; else
3997 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3998 fi
3999 # We set ac_cv_exeext here because the later test for it is not
4000 # safe: cross compilers may not add the suffix if given an `-o'
4001 # argument, so we may need to know it at that point already.
4002 # Even if this section looks crufty: it has the advantage of
4003 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 break;;
4005 * )
4006 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 esac
4008done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009test "$ac_cv_exeext" = no && ac_cv_exeext=
4010
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004011else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 ac_file=''
4013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004014if test -z "$ac_file"; then :
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004018sed 's/^/| /' conftest.$ac_ext >&5
4019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004022as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004023See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004024else
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4026$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4029$as_echo_n "checking for C compiler default output file name... " >&6; }
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4031$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4037$as_echo_n "checking for suffix of executables... " >&6; }
4038if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4050# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4051# work properly (i.e., refer to `conftest.exe'), while it won't with
4052# `rm'.
4053for ac_file in conftest.exe conftest conftest.*; do
4054 test -f "$ac_file" || continue
4055 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4058 break;;
4059 * ) break;;
4060 esac
4061done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062else
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004065as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004066See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004068rm -f conftest conftest$ac_cv_exeext
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4070$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004071
4072rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004073EXEEXT=$ac_cv_exeext
4074ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4076/* end confdefs.h. */
4077#include <stdio.h>
4078int
4079main ()
4080{
4081FILE *f = fopen ("conftest.out", "w");
4082 return ferror (f) || fclose (f) != 0;
4083
4084 ;
4085 return 0;
4086}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004088ac_clean_files="$ac_clean_files conftest.out"
4089# Check that the compiler produces executables we can run. If not, either
4090# the compiler is broken, or we cross compile.
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4092$as_echo_n "checking whether we are cross compiling... " >&6; }
4093if test "$cross_compiling" != yes; then
4094 { { ac_try="$ac_link"
4095case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098esac
4099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100$as_echo "$ac_try_echo"; } >&5
4101 (eval "$ac_link") 2>&5
4102 ac_status=$?
4103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4104 test $ac_status = 0; }
4105 if { ac_try='./conftest$ac_cv_exeext'
4106 { { case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
4110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
4112 (eval "$ac_try") 2>&5
4113 ac_status=$?
4114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; }; then
4116 cross_compiling=no
4117 else
4118 if test "$cross_compiling" = maybe; then
4119 cross_compiling=yes
4120 else
4121 { { $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 run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004124If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004125See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 fi
4127 fi
4128fi
4129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4130$as_echo "$cross_compiling" >&6; }
4131
4132rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4133ac_clean_files=$ac_clean_files_save
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4135$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
4138else
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140/* end confdefs.h. */
4141
4142int
4143main ()
4144{
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162 for ac_file in conftest.o conftest.obj conftest.*; do
4163 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4167 break;;
4168 esac
4169done
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004172sed 's/^/| /' conftest.$ac_ext >&5
4173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004176as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004177See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004179rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4182$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004183OBJEXT=$ac_cv_objext
4184ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4186$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193int
4194main ()
4195{
4196#ifndef __GNUC__
4197 choke me
4198#endif
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 ac_compiler_gnu=yes
4206else
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210ac_cv_c_compiler_gnu=$ac_compiler_gnu
4211
4212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4214$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4215if test $ac_compiler_gnu = yes; then
4216 GCC=yes
4217else
4218 GCC=
4219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_test_CFLAGS=${CFLAGS+set}
4221ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4223$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_save_c_werror_flag=$ac_c_werror_flag
4228 ac_c_werror_flag=yes
4229 ac_cv_prog_cc_g=no
4230 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis11437992002-04-12 09:54:03 +00004234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 CFLAGS=""
4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247/* end confdefs.h. */
4248
4249int
4250main ()
4251{
4252
4253 ;
4254 return 0;
4255}
4256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004257if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258
Matthias Kloseb9621712010-04-24 17:59:49 +00004259else
4260 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263/* end confdefs.h. */
4264
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4281 ac_c_werror_flag=$ac_save_c_werror_flag
4282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4284$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287elif test $ac_cv_prog_cc_g = yes; then
4288 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289 CFLAGS="-g -O2"
4290 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292 fi
4293else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 if test "$GCC" = yes; then
4295 CFLAGS="-O2"
4296 else
4297 CFLAGS=
4298 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4301$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004302if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004304else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004306ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
4309#include <stdarg.h>
4310#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004311struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004312/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4313struct buf { int x; };
4314FILE * (*rcsopen) (struct buf *, struct stat *, int);
4315static char *e (p, i)
4316 char **p;
4317 int i;
4318{
4319 return p[i];
4320}
4321static char *f (char * (*g) (char **, int), char **p, ...)
4322{
4323 char *s;
4324 va_list v;
4325 va_start (v,p);
4326 s = g (p, va_arg (v,int));
4327 va_end (v);
4328 return s;
4329}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330
4331/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4332 function prototypes and stuff, but not '\xHH' hex character constants.
4333 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4336 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4341 inside strings and character constants. */
4342#define FOO(x) 'x'
4343int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4344
Skip Montanaro6dead952003-09-25 14:50:04 +00004345int test (int i, double x);
4346struct s1 {int (*f) (int a);};
4347struct s2 {int (*f) (double a);};
4348int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4349int argc;
4350char **argv;
4351int
4352main ()
4353{
4354return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4355 ;
4356 return 0;
4357}
4358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4360 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004361do
4362 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f core conftest.err conftest.$ac_objext
4367 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004368done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370CC=$ac_save_CC
4371
4372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373# AC_CACHE_VAL
4374case "x$ac_cv_prog_cc_c89" in
4375 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4377$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4380$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4384$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004385esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004387
Matthias Kloseb9621712010-04-24 17:59:49 +00004388fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004389
Martin v. Löwis11437992002-04-12 09:54:03 +00004390ac_ext=c
4391ac_cpp='$CPP $CPPFLAGS'
4392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4394ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004396
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4400$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004405
4406 case $withval in
4407 no) with_cxx_main=no
4408 MAINCC='$(CC)';;
4409 yes) with_cxx_main=yes
4410 MAINCC='$(CXX)';;
4411 *) with_cxx_main=yes
4412 MAINCC=$withval
4413 if test -z "$CXX"
4414 then
4415 CXX=$withval
4416 fi;;
4417 esac
4418else
4419
4420 with_cxx_main=no
4421 MAINCC='$(CC)'
4422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423fi
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4426$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004427
4428preset_cxx="$CXX"
4429if test -z "$CXX"
4430then
4431 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004432 gcc) if test -n "$ac_tool_prefix"; then
4433 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4434set dummy ${ac_tool_prefix}g++; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_CXX+:} false; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 case $CXX in
4441 [\\/]* | ?:[\\/]*)
4442 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4443 ;;
4444 *)
4445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in notfound
4447do
4448 IFS=$as_save_IFS
4449 test -z "$as_dir" && as_dir=.
4450 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004452 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454 break 2
4455 fi
4456done
4457 done
4458IFS=$as_save_IFS
4459
4460 ;;
4461esac
4462fi
4463CXX=$ac_cv_path_CXX
4464if test -n "$CXX"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4466$as_echo "$CXX" >&6; }
4467else
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473fi
4474if test -z "$ac_cv_path_CXX"; then
4475 ac_pt_CXX=$CXX
4476 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004480if ${ac_cv_path_ac_pt_CXX+:} false; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 case $ac_pt_CXX in
4484 [\\/]* | ?:[\\/]*)
4485 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4486 ;;
4487 *)
4488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in notfound
4490do
4491 IFS=$as_save_IFS
4492 test -z "$as_dir" && as_dir=.
4493 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004494 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004495 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497 break 2
4498 fi
4499done
4500 done
4501IFS=$as_save_IFS
4502
4503 ;;
4504esac
4505fi
4506ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4507if test -n "$ac_pt_CXX"; then
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4509$as_echo "$ac_pt_CXX" >&6; }
4510else
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515 if test "x$ac_pt_CXX" = x; then
4516 CXX="g++"
4517 else
4518 case $cross_compiling:$ac_tool_warned in
4519yes:)
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4522ac_tool_warned=yes ;;
4523esac
4524 CXX=$ac_pt_CXX
4525 fi
4526else
4527 CXX="$ac_cv_path_CXX"
4528fi
4529 ;;
4530 cc) if test -n "$ac_tool_prefix"; then
4531 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4532set dummy ${ac_tool_prefix}c++; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004535if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537else
4538 case $CXX in
4539 [\\/]* | ?:[\\/]*)
4540 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4541 ;;
4542 *)
4543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in notfound
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552 break 2
4553 fi
4554done
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004556IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 ;;
4559esac
4560fi
4561CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004562if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4564$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565else
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004569
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004570
4571fi
4572if test -z "$ac_cv_path_CXX"; then
4573 ac_pt_CXX=$CXX
4574 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004579 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004581 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004583 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 +00004584 ;;
4585 *)
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in notfound
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595 break 2
4596 fi
4597done
Matthias Kloseb9621712010-04-24 17:59:49 +00004598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601 ;;
4602esac
4603fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004604ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4605if test -n "$ac_pt_CXX"; then
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4607$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004608else
Matthias Kloseb9621712010-04-24 17:59:49 +00004609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004613 if test "x$ac_pt_CXX" = x; then
4614 CXX="c++"
4615 else
4616 case $cross_compiling:$ac_tool_warned in
4617yes:)
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4620ac_tool_warned=yes ;;
4621esac
4622 CXX=$ac_pt_CXX
4623 fi
4624else
4625 CXX="$ac_cv_path_CXX"
4626fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004627 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 clang|*/clang) if test -n "$ac_tool_prefix"; then
4629 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4630set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004648 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
Ned Deilycbfb9a52012-06-23 16:02:19 -07004656 ;;
4657esac
4658fi
4659CXX=$ac_cv_path_CXX
4660if test -n "$CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4662$as_echo "$CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668
4669fi
4670if test -z "$ac_cv_path_CXX"; then
4671 ac_pt_CXX=$CXX
4672 # Extract the first word of "clang++", so it can be a program name with args.
4673set dummy clang++; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_ac_pt_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $ac_pt_CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4703if test -n "$ac_pt_CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4705$as_echo "$ac_pt_CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_pt_CXX" = x; then
4712 CXX="clang++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CXX=$ac_pt_CXX
4721 fi
4722else
4723 CXX="$ac_cv_path_CXX"
4724fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004725 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726 esac
4727 if test "$CXX" = "notfound"
4728 then
4729 CXX=""
4730 fi
4731fi
4732if test -z "$CXX"
4733then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734 if test -n "$ac_tool_prefix"; then
4735 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4736 do
4737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004741if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743else
4744 if test -n "$CXX"; then
4745 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4746else
4747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756 break 2
4757 fi
4758done
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761
4762fi
4763fi
4764CXX=$ac_cv_prog_CXX
4765if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4767$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771fi
4772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004773
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 test -n "$CXX" && break
4775 done
4776fi
4777if test -z "$CXX"; then
4778 ac_ct_CXX=$CXX
4779 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4780do
4781 # Extract the first word of "$ac_prog", so it can be a program name with args.
4782set dummy $ac_prog; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4786 $as_echo_n "(cached) " >&6
4787else
4788 if test -n "$ac_ct_CXX"; then
4789 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4790else
4791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in $PATH
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
4796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798 ac_cv_prog_ac_ct_CXX="$ac_prog"
4799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4800 break 2
4801 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803 done
4804IFS=$as_save_IFS
4805
4806fi
4807fi
4808ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4809if test -n "$ac_ct_CXX"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4811$as_echo "$ac_ct_CXX" >&6; }
4812else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818 test -n "$ac_ct_CXX" && break
4819done
4820
4821 if test "x$ac_ct_CXX" = x; then
4822 CXX="notfound"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_ct_CXX
4831 fi
4832fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
4834 if test "$CXX" = "notfound"
4835 then
4836 CXX=""
4837 fi
4838fi
4839if test "$preset_cxx" != "$CXX"
4840then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004841 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842
4843 By default, distutils will build C++ extension modules with \"$CXX\".
4844 If this is not intended, then set CXX on the configure command line.
4845 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
4848 By default, distutils will build C++ extension modules with \"$CXX\".
4849 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004850 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851fi
4852
4853
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4855$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4856save_LDFLAGS="$LDFLAGS"
4857LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860/* end confdefs.h. */
4861
4862int
4863main ()
4864{
4865
4866 ;
4867 return 0;
4868}
4869_ACEOF
4870if ac_fn_c_try_link "$LINENO"; then :
4871 NO_AS_NEEDED="-Wl,--no-as-needed"
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4873$as_echo "yes" >&6; }
4874else
4875 NO_AS_NEEDED=""
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879rm -f core conftest.err conftest.$ac_objext \
4880 conftest$ac_exeext conftest.$ac_ext
4881LDFLAGS="$save_LDFLAGS"
4882
4883
4884
4885# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004886ac_ext=c
4887ac_cpp='$CPP $CPPFLAGS'
4888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4890ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4892$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893# On Suns, sometimes $CPP names a directory.
4894if test -n "$CPP" && test -d "$CPP"; then
4895 CPP=
4896fi
4897if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004898 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004900else
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 # Double quotes because CPP needs to be expanded
4902 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4903 do
4904 ac_preproc_ok=false
4905for ac_c_preproc_warn_flag in '' yes
4906do
4907 # Use a header file that comes with gcc, so configuring glibc
4908 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004909 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4910 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004911 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* end confdefs.h. */
4915#ifdef __STDC__
4916# include <limits.h>
4917#else
4918# include <assert.h>
4919#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004920 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004922if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924else
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 # Broken: fails on valid input.
4926continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004927fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004928rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004930 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004934#include <ac_nonexistent.h>
4935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # Broken: success on invalid input.
4938continue
4939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # Passes both tests.
4941ac_preproc_ok=:
4942break
4943fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004945
4946done
4947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004948rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 break
4951fi
4952
4953 done
4954 ac_cv_prog_CPP=$CPP
4955
4956fi
4957 CPP=$ac_cv_prog_CPP
4958else
4959 ac_cv_prog_CPP=$CPP
4960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4962$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004963ac_preproc_ok=false
4964for ac_c_preproc_warn_flag in '' yes
4965do
4966 # Use a header file that comes with gcc, so configuring glibc
4967 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004968 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4969 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004970 # On the NeXT, cc -E runs the code through the compiler's parser,
4971 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004973/* end confdefs.h. */
4974#ifdef __STDC__
4975# include <limits.h>
4976#else
4977# include <assert.h>
4978#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004979 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004981if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004982
Matthias Kloseb9621712010-04-24 17:59:49 +00004983else
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 # Broken: fails on valid input.
4985continue
4986fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004987rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004993#include <ac_nonexistent.h>
4994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004995if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 # Broken: success on invalid input.
4997continue
4998else
Martin v. Löwis11437992002-04-12 09:54:03 +00004999 # Passes both tests.
5000ac_preproc_ok=:
5001break
5002fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005004
5005done
5006# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005007rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005008if $ac_preproc_ok; then :
5009
Martin v. Löwis11437992002-04-12 09:54:03 +00005010else
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005014See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005015fi
5016
5017ac_ext=c
5018ac_cpp='$CPP $CPPFLAGS'
5019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5021ac_compiler_gnu=$ac_cv_c_compiler_gnu
5022
5023
Matthias Kloseb9621712010-04-24 17:59:49 +00005024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5025$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005026if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005028else
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 # Loop through the user's path and test for each of PROGNAME-LIST
5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5034do
5035 IFS=$as_save_IFS
5036 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 for ac_prog in grep ggrep; do
5038 for ac_exec_ext in '' $ac_executable_extensions; do
5039 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005040 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005041# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 # Check for GNU $ac_path_GREP
5043case `"$ac_path_GREP" --version 2>&1` in
5044*GNU*)
5045 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5046*)
5047 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 while :
5050 do
5051 cat "conftest.in" "conftest.in" >"conftest.tmp"
5052 mv "conftest.tmp" "conftest.in"
5053 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5056 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005058 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5059 # Best one so far, save it but keep looking for a better one
5060 ac_cv_path_GREP="$ac_path_GREP"
5061 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005062 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 # 10*(2^10) chars as input seems more than enough
5064 test $ac_count -gt 10 && break
5065 done
5066 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5067esac
5068
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $ac_path_GREP_found && break 3
5070 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005075 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 +00005076 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077else
5078 ac_cv_path_GREP=$GREP
5079fi
5080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5083$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 GREP="$ac_cv_path_GREP"
5085
5086
Matthias Kloseb9621712010-04-24 17:59:49 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5088$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005089if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091else
5092 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5093 then ac_cv_path_EGREP="$GREP -E"
5094 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 # Loop through the user's path and test for each of PROGNAME-LIST
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 for ac_prog in egrep; do
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005106 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005107# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 # Check for GNU $ac_path_EGREP
5109case `"$ac_path_EGREP" --version 2>&1` in
5110*GNU*)
5111 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5112*)
5113 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115 while :
5116 do
5117 cat "conftest.in" "conftest.in" >"conftest.tmp"
5118 mv "conftest.tmp" "conftest.in"
5119 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5122 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5125 # Best one so far, save it but keep looking for a better one
5126 ac_cv_path_EGREP="$ac_path_EGREP"
5127 ac_path_EGREP_max=$ac_count
5128 fi
5129 # 10*(2^10) chars as input seems more than enough
5130 test $ac_count -gt 10 && break
5131 done
5132 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5133esac
5134
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 $ac_path_EGREP_found && break 3
5136 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005141 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 +00005142 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143else
5144 ac_cv_path_EGREP=$EGREP
5145fi
5146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 fi
5148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5150$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005151 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005152
5153
Matthias Kloseb9621712010-04-24 17:59:49 +00005154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5155$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005156if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo_n "(cached) " >&6
5158else
5159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005160/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005161#include <stdlib.h>
5162#include <stdarg.h>
5163#include <string.h>
5164#include <float.h>
5165
5166int
5167main ()
5168{
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174if ac_fn_c_try_compile "$LINENO"; then :
5175 ac_cv_header_stdc=yes
5176else
5177 ac_cv_header_stdc=no
5178fi
5179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5180
5181if test $ac_cv_header_stdc = yes; then
5182 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005186
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005187_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005190
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005191else
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005193fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005194rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195
Matthias Kloseb9621712010-04-24 17:59:49 +00005196fi
5197
5198if test $ac_cv_header_stdc = yes; then
5199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202#include <stdlib.h>
5203
5204_ACEOF
5205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5206 $EGREP "free" >/dev/null 2>&1; then :
5207
5208else
5209 ac_cv_header_stdc=no
5210fi
5211rm -f conftest*
5212
5213fi
5214
5215if test $ac_cv_header_stdc = yes; then
5216 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5217 if test "$cross_compiling" = yes; then :
5218 :
5219else
5220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221/* end confdefs.h. */
5222#include <ctype.h>
5223#include <stdlib.h>
5224#if ((' ' & 0x0FF) == 0x020)
5225# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5226# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5227#else
5228# define ISLOWER(c) \
5229 (('a' <= (c) && (c) <= 'i') \
5230 || ('j' <= (c) && (c) <= 'r') \
5231 || ('s' <= (c) && (c) <= 'z'))
5232# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5233#endif
5234
5235#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5236int
5237main ()
5238{
5239 int i;
5240 for (i = 0; i < 256; i++)
5241 if (XOR (islower (i), ISLOWER (i))
5242 || toupper (i) != TOUPPER (i))
5243 return 2;
5244 return 0;
5245}
5246_ACEOF
5247if ac_fn_c_try_run "$LINENO"; then :
5248
5249else
5250 ac_cv_header_stdc=no
5251fi
5252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5253 conftest.$ac_objext conftest.beam conftest.$ac_ext
5254fi
5255
5256fi
5257fi
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5259$as_echo "$ac_cv_header_stdc" >&6; }
5260if test $ac_cv_header_stdc = yes; then
5261
5262$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5263
5264fi
5265
5266# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5267for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5268 inttypes.h stdint.h unistd.h
5269do :
5270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5271ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5272"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005274 cat >>confdefs.h <<_ACEOF
5275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5276_ACEOF
5277
5278fi
5279
5280done
5281
5282
5283
5284 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 +02005285if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 MINIX=yes
5287else
5288 MINIX=
5289fi
5290
5291
5292 if test "$MINIX" = yes; then
5293
5294$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5295
5296
5297$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5298
5299
5300$as_echo "#define _MINIX 1" >>confdefs.h
5301
5302 fi
5303
5304
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5306$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005307if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 $as_echo_n "(cached) " >&6
5309else
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311/* end confdefs.h. */
5312
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005313# define __EXTENSIONS__ 1
5314 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_compile "$LINENO"; then :
5324 ac_cv_safe_to_define___extensions__=yes
5325else
5326 ac_cv_safe_to_define___extensions__=no
5327fi
5328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329fi
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5331$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5332 test $ac_cv_safe_to_define___extensions__ = yes &&
5333 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5334
5335 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5336
5337 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5338
5339 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5340
5341 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5342
5343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345# Check for unsupported systems
5346case $ac_sys_system/$ac_sys_release in
5347atheos*|Linux*/1*)
5348 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5349 echo See README for details.
5350 exit 1;;
5351esac
5352
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5355$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356
5357# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005358if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 withval=$with_suffix;
5360 case $withval in
5361 no) EXEEXT=;;
5362 yes) EXEEXT=.exe;;
5363 *) EXEEXT=$withval;;
5364 esac
5365fi
5366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5368$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# Test whether we're running on a non-case-sensitive system, in which
5371# case we give a warning if no ext is given
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5374$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375if test ! -d CaseSensitiveTestDir; then
5376mkdir CaseSensitiveTestDir
5377fi
5378
5379if test -d casesensitivetestdir
5380then
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=.exe
5384else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 BUILDEXEEXT=$EXEEXT
5388fi
5389rmdir CaseSensitiveTestDir
5390
5391case $MACHDEP in
5392bsdos*)
5393 case $CC in
5394 gcc) CC="$CC -D_HAVE_BSDI";;
5395 esac;;
5396esac
5397
5398case $ac_sys_system in
5399hp*|HP*)
5400 case $CC in
5401 cc|*/cc) CC="$CC -Ae";;
5402 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403esac
5404
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005405MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5406
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5411$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$LIBRARY"
5413then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005414 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5417$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419# LDLIBRARY is the name of the library to link against (as opposed to the
5420# name of the library into which to insert object files). BLDLIBRARY is also
5421# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5422# is blank as the main program is not linked directly against LDLIBRARY.
5423# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5424# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5425# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5426# DLLLIBRARY is the shared (i.e., DLL) library.
5427#
5428# RUNSHARED is used to run shared python without installed libraries
5429#
5430# INSTSONAME is the name of the shared library that will be use to install
5431# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005432#
5433# LDVERSION is the shared library version number, normally the Python version
5434# with the ABI build flags appended.
5435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437
5438
5439
5440
5441
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005442
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443LDLIBRARY="$LIBRARY"
5444BLDLIBRARY='$(LDLIBRARY)'
5445INSTSONAME='$(LDLIBRARY)'
5446DLLLIBRARY=''
5447LDLIBRARYDIR=''
5448RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005449LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451# LINKCC is the command that links the python executable -- default is $(CC).
5452# If CXX is set, and if it is needed to link a main function that was
5453# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5454# python might then depend on the C++ runtime
5455# This is altered for AIX in order to build the export list before
5456# linking.
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5459$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460if test -z "$LINKCC"
5461then
5462 LINKCC='$(PURIFY) $(MAINCC)'
5463 case $ac_sys_system in
5464 AIX*)
5465 exp_extra="\"\""
5466 if test $ac_sys_release -ge 5 -o \
5467 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5468 exp_extra="."
5469 fi
5470 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471 QNX*)
5472 # qcc must be used because the other compilers do not
5473 # support -N.
5474 LINKCC=qcc;;
5475 esac
5476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5478$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479
5480# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5481# make sure we default having it set to "no": this is used by
5482# distutils.unixccompiler to know if it should add --enable-new-dtags
5483# to linker command lines, and failing to detect GNU ld simply results
5484# in the same bahaviour as before.
5485
Matthias Kloseb9621712010-04-24 17:59:49 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5487$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488ac_prog=ld
5489if test "$GCC" = yes; then
5490 ac_prog=`$CC -print-prog-name=ld`
5491fi
5492case `"$ac_prog" -V 2>&1 < /dev/null` in
5493 *GNU*)
5494 GNULD=yes;;
5495 *)
5496 GNULD=no;;
5497esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5499$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5502$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005503if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005504 $as_echo_n "(cached) " >&6
5505else
5506 ac_cv_c_inline=no
5507for ac_kw in inline __inline__ __inline; do
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#ifndef __cplusplus
5511typedef int foo_t;
5512static $ac_kw foo_t static_foo () {return 0; }
5513$ac_kw foo_t foo () {return 0; }
5514#endif
5515
5516_ACEOF
5517if ac_fn_c_try_compile "$LINENO"; then :
5518 ac_cv_c_inline=$ac_kw
5519fi
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 test "$ac_cv_c_inline" != no && break
5522done
5523
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5526$as_echo "$ac_cv_c_inline" >&6; }
5527
5528case $ac_cv_c_inline in
5529 inline | yes) ;;
5530 *)
5531 case $ac_cv_c_inline in
5532 no) ac_val=;;
5533 *) ac_val=$ac_cv_c_inline;;
5534 esac
5535 cat >>confdefs.h <<_ACEOF
5536#ifndef __cplusplus
5537#define inline $ac_val
5538#endif
5539_ACEOF
5540 ;;
5541esac
5542
5543if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005544
5545$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005546
5547
5548fi
5549
5550
Matthias Kloseb9621712010-04-24 17:59:49 +00005551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5552$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005554if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 enableval=$enable_shared;
5556fi
5557
5558
5559if test -z "$enable_shared"
5560then
5561 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005562 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 enable_shared="yes";;
5564 *)
5565 enable_shared="no";;
5566 esac
5567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5569$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
Matthias Kloseb9621712010-04-24 17:59:49 +00005571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5572$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005574if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005575 enableval=$enable_profiling;
5576fi
5577
5578if test "x$enable_profiling" = xyes; then
5579 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005580 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582/* end confdefs.h. */
5583int main() { return 0; }
5584_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585if ac_fn_c_try_link "$LINENO"; then :
5586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005588 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005590rm -f core conftest.err conftest.$ac_objext \
5591 conftest$ac_exeext conftest.$ac_ext
5592 CC="$ac_save_cc"
5593else
5594 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5597$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
doko@ubuntu.comba015832012-06-30 16:52:05 +02005599if test "x$enable_profiling" = xyes; then
5600 BASECFLAGS="-pg $BASECFLAGS"
5601 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602fi
5603
Matthias Kloseb9621712010-04-24 17:59:49 +00005604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5605$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606
5607# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5608# library that we build, but we do not want to link against it (we
5609# will find it with a -framework option). For this reason there is an
5610# extra variable BLDLIBRARY against which Python and the extension
5611# modules are linked, BLDLIBRARY. This is normally the same as
5612# LDLIBRARY, but empty for MacOSX framework builds.
5613if test "$enable_framework"
5614then
5615 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005616 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617 BLDLIBRARY=''
5618else
5619 BLDLIBRARY='$(LDLIBRARY)'
5620fi
5621
5622# Other platforms follow
5623if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005624 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
5628 case $ac_sys_system in
5629 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).dll.a'
5631 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 ;;
5633 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005634 LDLIBRARY='libpython$(LDVERSION).so'
5635 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005636 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005638 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005639 then
5640 PY3LIBRARY=libpython3.so
5641 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005643 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005646 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 case $ac_sys_system in
5648 FreeBSD*)
5649 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5650 ;;
5651 esac
5652 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005653 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005654 then
5655 PY3LIBRARY=libpython3.so
5656 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 ;;
5658 hp*|HP*)
5659 case `uname -m` in
5660 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005661 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ;;
5663 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
5666 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005668 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).dylib'
5672 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005675 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005676 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005677 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005678 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680 esac
5681else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005682 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 case $ac_sys_system in
5684 CYGWIN*)
5685 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 ;;
5688 esac
5689fi
5690
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005691if test "$cross_compiling" = yes; then
5692 RUNSHARED=
5693fi
5694
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5696$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698if test -n "$ac_tool_prefix"; then
5699 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5700set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005703if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705else
5706 if test -n "$RANLIB"; then
5707 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5708else
5709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712 IFS=$as_save_IFS
5713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 break 2
5719 fi
5720done
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722IFS=$as_save_IFS
5723
5724fi
5725fi
5726RANLIB=$ac_cv_prog_RANLIB
5727if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5729$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733fi
5734
5735
5736fi
5737if test -z "$ac_cv_prog_RANLIB"; then
5738 ac_ct_RANLIB=$RANLIB
5739 # Extract the first word of "ranlib", so it can be a program name with args.
5740set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005743if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745else
5746 if test -n "$ac_ct_RANLIB"; then
5747 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5748else
5749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752 IFS=$as_save_IFS
5753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 break 2
5759 fi
5760done
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762IFS=$as_save_IFS
5763
5764fi
5765fi
5766ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5767if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5769$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
5774
5775 if test "x$ac_ct_RANLIB" = x; then
5776 RANLIB=":"
5777 else
5778 case $cross_compiling:$ac_tool_warned in
5779yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_tool_warned=yes ;;
5783esac
5784 RANLIB=$ac_ct_RANLIB
5785 fi
5786else
5787 RANLIB="$ac_cv_prog_RANLIB"
5788fi
5789
5790
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005791if test -n "$ac_tool_prefix"; then
5792 for ac_prog in ar aal
5793 do
5794 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005798if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800else
5801 if test -n "$AR"; then
5802 ac_cv_prog_AR="$AR" # Let the user override the test.
5803else
5804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807 IFS=$as_save_IFS
5808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 break 2
5814 fi
5815done
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817IFS=$as_save_IFS
5818
5819fi
5820fi
5821AR=$ac_cv_prog_AR
5822if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5824$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
5829
5830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005831 test -n "$AR" && break
5832 done
5833fi
5834if test -z "$AR"; then
5835 ac_ct_AR=$AR
5836 for ac_prog in ar aal
5837do
5838 # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_prog_ac_ct_AR+:} false; then :
5843 $as_echo_n "(cached) " >&6
5844else
5845 if test -n "$ac_ct_AR"; then
5846 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005855 ac_cv_prog_ac_ct_AR="$ac_prog"
5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 break 2
5858 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005860 done
5861IFS=$as_save_IFS
5862
5863fi
5864fi
5865ac_ct_AR=$ac_cv_prog_ac_ct_AR
5866if test -n "$ac_ct_AR"; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5868$as_echo "$ac_ct_AR" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875 test -n "$ac_ct_AR" && break
5876done
5877
5878 if test "x$ac_ct_AR" = x; then
5879 AR="ar"
5880 else
5881 case $cross_compiling:$ac_tool_warned in
5882yes:)
5883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5885ac_tool_warned=yes ;;
5886esac
5887 AR=$ac_ct_AR
5888 fi
5889fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
5891
5892# tweak ARFLAGS only if the user didn't set it on the command line
5893
5894if test -z "$ARFLAGS"
5895then
5896 ARFLAGS="rc"
5897fi
5898
doko@ubuntu.com58844492012-06-30 18:25:32 +02005899if test -n "$ac_tool_prefix"; then
5900 for ac_prog in readelf
5901 do
5902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_prog_READELF+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908else
5909 if test -n "$READELF"; then
5910 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5911else
5912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915 IFS=$as_save_IFS
5916 test -z "$as_dir" && as_dir=.
5917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005919 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921 break 2
5922 fi
5923done
5924 done
5925IFS=$as_save_IFS
5926
5927fi
5928fi
5929READELF=$ac_cv_prog_READELF
5930if test -n "$READELF"; then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5932$as_echo "$READELF" >&6; }
5933else
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939 test -n "$READELF" && break
5940 done
5941fi
5942if test -z "$READELF"; then
5943 ac_ct_READELF=$READELF
5944 for ac_prog in readelf
5945do
5946 # Extract the first word of "$ac_prog", so it can be a program name with args.
5947set dummy $ac_prog; ac_word=$2
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
5950if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5951 $as_echo_n "(cached) " >&6
5952else
5953 if test -n "$ac_ct_READELF"; then
5954 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5955else
5956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959 IFS=$as_save_IFS
5960 test -z "$as_dir" && as_dir=.
5961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005963 ac_cv_prog_ac_ct_READELF="$ac_prog"
5964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965 break 2
5966 fi
5967done
5968 done
5969IFS=$as_save_IFS
5970
5971fi
5972fi
5973ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5974if test -n "$ac_ct_READELF"; then
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5976$as_echo "$ac_ct_READELF" >&6; }
5977else
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983 test -n "$ac_ct_READELF" && break
5984done
5985
5986 if test "x$ac_ct_READELF" = x; then
5987 READELF=":"
5988 else
5989 case $cross_compiling:$ac_tool_warned in
5990yes:)
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5993ac_tool_warned=yes ;;
5994esac
5995 READELF=$ac_ct_READELF
5996 fi
5997fi
5998
5999if test "$cross_compiling" = yes; then
6000 case "$READELF" in
6001 readelf|:)
6002 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6003 ;;
6004 esac
6005fi
6006
6007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
Matthias Klosec4c48422012-10-21 23:05:35 +02006009for ac_prog in python$PACKAGE_VERSION python3 python
6010do
6011 # Extract the first word of "$ac_prog", so it can be a program name with args.
6012set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006015if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016 $as_echo_n "(cached) " >&6
6017else
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 if test -n "$PYTHON"; then
6019 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006020else
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
6026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030 break 2
6031 fi
6032done
6033 done
6034IFS=$as_save_IFS
6035
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006036fi
6037fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006038PYTHON=$ac_cv_prog_PYTHON
6039if test -n "$PYTHON"; then
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6041$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042else
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
Matthias Klosec4c48422012-10-21 23:05:35 +02006048 test -n "$PYTHON" && break
6049done
6050test -n "$PYTHON" || PYTHON="not-found"
6051
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006053 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6054else
6055 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006056fi
6057
6058
Kushal Das02d23a22014-04-15 23:50:06 +05306059for ac_prog in python$PACKAGE_VERSION python3 python
6060do
6061 # Extract the first word of "$ac_prog", so it can be a program name with args.
6062set dummy $ac_prog; ac_word=$2
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064$as_echo_n "checking for $ac_word... " >&6; }
6065if ${ac_cv_prog_PYTHON+:} false; then :
6066 $as_echo_n "(cached) " >&6
6067else
6068 if test -n "$PYTHON"; then
6069 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6070else
6071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_exec_ext in '' $ac_executable_extensions; do
6077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078 ac_cv_prog_PYTHON="$ac_prog"
6079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080 break 2
6081 fi
6082done
6083 done
6084IFS=$as_save_IFS
6085
6086fi
6087fi
6088PYTHON=$ac_cv_prog_PYTHON
6089if test -n "$PYTHON"; then
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6091$as_echo "$PYTHON" >&6; }
6092else
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
6095fi
6096
6097
6098 test -n "$PYTHON" && break
6099done
6100test -n "$PYTHON" || PYTHON="not-found"
6101
6102if test "$PYTHON" = not-found; then
6103 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6104else
6105 OPCODEHGEN="$PYTHON"
6106fi
6107
6108
6109
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110case $MACHDEP in
6111bsdos*|hp*|HP*)
6112 # install -d does not work on BSDI or HP-UX
6113 if test -z "$INSTALL"
6114 then
6115 INSTALL="${srcdir}/install-sh -c"
6116 fi
6117esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118# Find a good install program. We prefer a C program (faster),
6119# so one script is as good as another. But avoid the broken or
6120# incompatible versions:
6121# SysV /etc/install, /usr/sbin/install
6122# SunOS /usr/etc/install
6123# IRIX /sbin/install
6124# AIX /bin/install
6125# AmigaOS /C/install, which installs bootblocks on floppy discs
6126# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6127# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6128# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6129# OS/2's system install, which has a completely different semantic
6130# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006131# Reject install programs that cannot install multiple files.
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6133$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006135if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137else
6138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139for as_dir in $PATH
6140do
6141 IFS=$as_save_IFS
6142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 # Account for people who put trailing slashes in PATH elements.
6144case $as_dir/ in #((
6145 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 /usr/ucb/* ) ;;
6149 *)
6150 # OSF1 and SCO ODT 3.0 have their own names for install.
6151 # Don't use installbsd from OSF since it installs stuff as root
6152 # by default.
6153 for ac_prog in ginstall scoinst install; do
6154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006155 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 if test $ac_prog = install &&
6157 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # AIX install. It has an incompatible calling convention.
6159 :
6160 elif test $ac_prog = install &&
6161 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6162 # program-specific install script used by HP pwplus--don't use.
6163 :
6164 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 rm -rf conftest.one conftest.two conftest.dir
6166 echo one > conftest.one
6167 echo two > conftest.two
6168 mkdir conftest.dir
6169 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6170 test -s conftest.one && test -s conftest.two &&
6171 test -s conftest.dir/conftest.one &&
6172 test -s conftest.dir/conftest.two
6173 then
6174 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6175 break 3
6176 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 fi
6178 fi
6179 done
6180 done
6181 ;;
6182esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006183
6184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185IFS=$as_save_IFS
6186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189fi
6190 if test "${ac_cv_path_install+set}" = set; then
6191 INSTALL=$ac_cv_path_install
6192 else
6193 # As a last resort, use the slow shell script. Don't cache a
6194 # value for INSTALL within a source directory, because that will
6195 # break other packages using the cache if that directory is
6196 # removed, or if the value is a relative name.
6197 INSTALL=$ac_install_sh
6198 fi
6199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6201$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
6203# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6204# It thinks the first close brace ends the variable substitution.
6205test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6206
6207test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6208
6209test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6210
Matthias Klose93a0ef12012-03-15 18:08:34 +01006211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6212$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6213if test -z "$MKDIR_P"; then
6214 if ${ac_cv_path_mkdir+:} false; then :
6215 $as_echo_n "(cached) " >&6
6216else
6217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6219do
6220 IFS=$as_save_IFS
6221 test -z "$as_dir" && as_dir=.
6222 for ac_prog in mkdir gmkdir; do
6223 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006224 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006225 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6226 'mkdir (GNU coreutils) '* | \
6227 'mkdir (coreutils) '* | \
6228 'mkdir (fileutils) '4.1*)
6229 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6230 break 3;;
6231 esac
6232 done
6233 done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238
6239 test -d ./--version && rmdir ./--version
6240 if test "${ac_cv_path_mkdir+set}" = set; then
6241 MKDIR_P="$ac_cv_path_mkdir -p"
6242 else
6243 # As a last resort, use the slow shell script. Don't cache a
6244 # value for MKDIR_P within a source directory, because that will
6245 # break other packages using the cache if that directory is
6246 # removed, or if the value is a relative name.
6247 MKDIR_P="$ac_install_sh -d"
6248 fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6251$as_echo "$MKDIR_P" >&6; }
6252
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253
6254# Not every filesystem supports hard links
6255
6256if test -z "$LN" ; then
6257 case $ac_sys_system in
6258 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259 *) LN=ln;;
6260 esac
6261fi
6262
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006263# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006264
6265ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6269$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270
6271# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006272if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273 withval=$with_pydebug;
6274if test "$withval" != no
6275then
6276
Matthias Kloseb9621712010-04-24 17:59:49 +00006277$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6280$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006282 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006283else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289fi
6290
6291
6292# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6293# merged with this chunk of code?
6294
6295# Optimizer/debugger flags
6296# ------------------------
6297# (The following bit of code is complicated enough - please keep things
6298# indented properly. Just pretend you're editing Python code. ;-)
6299
6300# There are two parallel sets of case statements below, one that checks to
6301# see if OPT was set and one that does BASECFLAGS setting based upon
6302# compiler and platform. BASECFLAGS tweaks need to be made even if the
6303# user set OPT.
6304
6305# tweak OPT based on compiler and platform, only if the user didn't set
6306# it on the command line
6307
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006308if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309then
6310 case $GCC in
6311 yes)
6312 if test "$CC" != 'g++' ; then
6313 STRICT_PROTO="-Wstrict-prototypes"
6314 fi
6315 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6316 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6317 WRAP="-fwrapv"
6318 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006319
6320 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006321 case $CC in
6322 *clang*) WRAP="-fwrapv"
6323 ;;
6324 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006325
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 case $ac_cv_prog_cc_g in
6327 yes)
6328 if test "$Py_DEBUG" = 'true' ; then
6329 # Optimization messes up debuggers, so turn it off for
6330 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006331 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 else
6333 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6334 fi
6335 ;;
6336 *)
6337 OPT="-O3 -Wall $STRICT_PROTO"
6338 ;;
6339 esac
6340 case $ac_sys_system in
6341 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6342 ;;
6343 esac
6344 ;;
6345
6346 *)
6347 OPT="-O"
6348 ;;
6349 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
6353
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355# The -arch flags for universal builds on OSX
6356UNIVERSAL_ARCH_FLAGS=
6357
6358
6359# tweak BASECFLAGS based on compiler and platform
6360case $GCC in
6361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 # Python doesn't violate C99 aliasing rules, but older versions of
6363 # GCC produce warnings for legal Python code. Enable
6364 # -fno-strict-aliasing on versions of GCC that support but produce
6365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 ac_save_cc="$CC"
6369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006370 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006371 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006376
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006378int
6379main ()
6380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006382 ;
6383 return 0;
6384}
Matthias Kloseb159a552010-04-25 21:00:44 +00006385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006388
6389 CC="$ac_save_cc -fstrict-aliasing"
6390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006392/* end confdefs.h. */
6393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395int
6396main ()
6397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006399 ;
6400 return 0;
6401}
Matthias Kloseb159a552010-04-25 21:00:44 +00006402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006405
6406 ac_cv_no_strict_aliasing=no
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408else
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
6410 ac_cv_no_strict_aliasing=yes
6411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415else
Matthias Kloseb159a552010-04-25 21:00:44 +00006416
6417 ac_cv_no_strict_aliasing=no
6418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006421fi
6422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 then
6429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6430 fi
6431
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6433$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6434 ac_save_cc="$CC"
6435 CC="$CC -Wunused-result -Werror"
6436 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006437 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006438 $as_echo_n "(cached) " >&6
6439else
6440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441/* end confdefs.h. */
6442
6443
6444int
6445main ()
6446{
6447
6448 ;
6449 return 0;
6450}
6451
6452_ACEOF
6453if ac_fn_c_try_compile "$LINENO"; then :
6454
6455 ac_cv_disable_unused_result_warning=yes
6456
6457else
6458
6459 ac_cv_disable_unused_result_warning=no
6460
6461fi
6462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6463fi
6464
6465 CFLAGS="$save_CFLAGS"
6466 CC="$ac_save_cc"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6468$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6469
6470 if test $ac_cv_disable_unused_result_warning = yes
6471 then
6472 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6473 fi
6474
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6476$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6477 ac_save_cc="$CC"
6478 CC="$CC -Werror=declaration-after-statement"
6479 save_CFLAGS="$CFLAGS"
6480 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6481 $as_echo_n "(cached) " >&6
6482else
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484/* end confdefs.h. */
6485
6486
6487int
6488main ()
6489{
6490
6491 ;
6492 return 0;
6493}
6494
6495_ACEOF
6496if ac_fn_c_try_compile "$LINENO"; then :
6497
6498 ac_cv_declaration_after_statement_warning=yes
6499
6500else
6501
6502 ac_cv_declaration_after_statement_warning=no
6503
6504fi
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506fi
6507
6508 CFLAGS="$save_CFLAGS"
6509 CC="$ac_save_cc"
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6511$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6512
6513 if test $ac_cv_declaration_after_statement_warning = yes
6514 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006515 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006516 fi
6517
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6519$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6520 ac_save_cc="$CC"
6521 CC="$CC -Wsign-compare"
6522 save_CFLAGS="$CFLAGS"
6523 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525else
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527/* end confdefs.h. */
6528
6529
6530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
6537
6538_ACEOF
6539if ac_fn_c_try_compile "$LINENO"; then :
6540
6541 ac_cv_enable_sign_compare_warning=yes
6542
6543else
6544
6545 ac_cv_enable_sign_compare_warning=no
6546
6547fi
6548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6549fi
6550
6551 CFLAGS="$save_CFLAGS"
6552 CC="$ac_save_cc"
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6554$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6555
6556 if test $ac_cv_enable_sign_compare_warning = yes
6557 then
6558 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6559 fi
6560
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6562$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6563 ac_save_cc="$CC"
6564 CC="$CC -Wunreachable-code"
6565 save_CFLAGS="$CFLAGS"
6566 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6570/* end confdefs.h. */
6571
6572
6573int
6574main ()
6575{
6576
6577 ;
6578 return 0;
6579}
6580
6581_ACEOF
6582if ac_fn_c_try_compile "$LINENO"; then :
6583
6584 ac_cv_enable_unreachable_code_warning=yes
6585
6586else
6587
6588 ac_cv_enable_unreachable_code_warning=no
6589
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592fi
6593
6594 CFLAGS="$save_CFLAGS"
6595 CC="$ac_save_cc"
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6597$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6598
6599 # Don't enable unreachable code warning in debug mode, since it usually
6600 # results in non-standard code paths.
6601 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6602 then
6603 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6604 fi
6605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6607 # support. Without this, treatment of subnormals doesn't follow
6608 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006609 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 alpha*)
6611 BASECFLAGS="$BASECFLAGS -mieee"
6612 ;;
6613 esac
6614
6615 case $ac_sys_system in
6616 SCO_SV*)
6617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6618 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006619
6620 # is there any other compiler on Darwin besides gcc?
6621 Darwin*)
6622 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6623 # used to be here, but non-Apple gcc doesn't accept them.
6624 if test "${CC}" = gcc
6625 then
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006627$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006628 case "${UNIVERSALSDK}" in
6629 */MacOSX10.4u.sdk)
6630 # Build using 10.4 SDK, force usage of gcc when the
6631 # compiler is gcc, otherwise the user will get very
6632 # confusing error messages when building on OSX 10.6
6633 CC=gcc-4.0
6634 CPP=cpp-4.0
6635 ;;
6636 esac
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006638$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006639 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640
Ned Deily87adb6e2013-10-18 21:09:56 -07006641 if test "${enable_universalsdk}"
6642 then
6643 case "$UNIVERSAL_ARCHS" in
6644 32-bit)
6645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6646 LIPO_32BIT_FLAGS=""
6647 ARCH_RUN_32BIT=""
6648 ;;
6649 64-bit)
6650 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6651 LIPO_32BIT_FLAGS=""
6652 ARCH_RUN_32BIT="true"
6653 ;;
6654 all)
6655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6656 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6657 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6658 ;;
6659 intel)
6660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6661 LIPO_32BIT_FLAGS="-extract i386"
6662 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6663 ;;
6664 intel-32)
6665 UNIVERSAL_ARCH_FLAGS="-arch i386"
6666 LIPO_32BIT_FLAGS=""
6667 ARCH_RUN_32BIT=""
6668 ;;
6669 3-way)
6670 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6671 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6672 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6673 ;;
6674 *)
6675 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6676 ;;
6677 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678
Ned Deily87adb6e2013-10-18 21:09:56 -07006679 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6680 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6681 if test "${UNIVERSALSDK}" != "/"
6682 then
6683 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6684 fi
6685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686
Ned Deily87adb6e2013-10-18 21:09:56 -07006687 # Calculate an appropriate deployment target for this build:
6688 # The deployment target value is used explicitly to enable certain
6689 # features are enabled (such as builtin libedit support for readline)
6690 # through the use of Apple's Availabiliy Macros and is used as a
6691 # component of the string returned by distutils.get_platform().
6692 #
6693 # Use the value from:
6694 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6695 # 2. the operating system version of the build machine if >= 10.6
6696 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6697 # below to pick either 10.3, 10.4, or 10.5 as the target.
6698 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699
Ned Deily87adb6e2013-10-18 21:09:56 -07006700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6701$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006702 cur_target_major=`sw_vers -productVersion | \
6703 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6704 cur_target_minor=`sw_vers -productVersion | \
6705 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6706 cur_target="${cur_target_major}.${cur_target_minor}"
6707 if test ${cur_target_major} -eq 10 && \
6708 test ${cur_target_minor} -ge 3 && \
6709 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006710 then
Ned Deily36820b62014-06-25 13:44:22 -07006711 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006712 cur_target=10.3
6713 if test ${enable_universalsdk}
6714 then
6715 case "$UNIVERSAL_ARCHS" in
6716 all|3-way|intel|64-bit)
6717 # These configurations were first supported in 10.5
6718 cur_target='10.5'
6719 ;;
6720 esac
6721 else
6722 if test `/usr/bin/arch` = "i386"
6723 then
6724 # 10.4 was the first release to support Intel archs
6725 cur_target="10.4"
6726 fi
6727 fi
6728 fi
6729 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006730
Ned Deily87adb6e2013-10-18 21:09:56 -07006731 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6732 # environment with a value that is the same as what we'll use
6733 # in the Makefile to ensure that we'll get the same compiler
6734 # environment during configure and build time.
6735 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6736 export MACOSX_DEPLOYMENT_TARGET
6737 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6739$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006740
Ned Deily87adb6e2013-10-18 21:09:56 -07006741 # end of Darwin* tests
6742 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 esac
6744 ;;
6745
6746*)
6747 case $ac_sys_system in
6748 OpenUNIX*|UnixWare*)
6749 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6750 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 SCO_SV*)
6752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6753 ;;
6754 esac
6755 ;;
6756esac
6757
6758if test "$Py_DEBUG" = 'true'; then
6759 :
6760else
6761 OPT="-DNDEBUG $OPT"
6762fi
6763
6764if test "$ac_arch_flags"
6765then
6766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6767fi
6768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769# On some compilers, pthreads are available without further options
6770# (e.g. MacOS X). On some of these systems, the compiler will not
6771# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6772# So we have to see first whether pthreads are available without
6773# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6775$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006776if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780 ac_cv_pthread_is_default=no
6781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783/* end confdefs.h. */
6784
Stefan Krah7dba5942012-11-22 22:49:11 +01006785#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786#include <pthread.h>
6787
6788void* routine(void* p){return NULL;}
6789
6790int main(){
6791 pthread_t p;
6792 if(pthread_create(&p,NULL,routine,NULL)!=0)
6793 return 1;
6794 (void)pthread_detach(p);
6795 return 0;
6796}
6797
6798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006799if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800
6801 ac_cv_pthread_is_default=yes
6802 ac_cv_kthread=no
6803 ac_cv_pthread=no
6804
6805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
6811
6812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
6814
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6816$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817
6818
6819if test $ac_cv_pthread_is_default = yes
6820then
6821 ac_cv_kpthread=no
6822else
6823# -Kpthread, if available, provides the right #defines
6824# and linker options to make pthread_create available
6825# Some compilers won't report that they do not support -Kpthread,
6826# so we need to run a program to see whether it really made the
6827# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6829$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006830if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832else
6833 ac_save_cc="$CC"
6834CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006835if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 ac_cv_kpthread=no
6837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840
Stefan Krah7dba5942012-11-22 22:49:11 +01006841#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842#include <pthread.h>
6843
6844void* routine(void* p){return NULL;}
6845
6846int main(){
6847 pthread_t p;
6848 if(pthread_create(&p,NULL,routine,NULL)!=0)
6849 return 1;
6850 (void)pthread_detach(p);
6851 return 0;
6852}
6853
6854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 ac_cv_kpthread=yes
6857else
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
6863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864CC="$ac_save_cc"
6865fi
6866
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6868$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869fi
6870
6871if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6872then
6873# -Kthread, if available, provides the right #defines
6874# and linker options to make pthread_create available
6875# Some compilers won't report that they do not support -Kthread,
6876# so we need to run a program to see whether it really made the
6877# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6879$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006880if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882else
6883 ac_save_cc="$CC"
6884CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006885if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 ac_cv_kthread=no
6887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889/* end confdefs.h. */
6890
Stefan Krah7dba5942012-11-22 22:49:11 +01006891#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892#include <pthread.h>
6893
6894void* routine(void* p){return NULL;}
6895
6896int main(){
6897 pthread_t p;
6898 if(pthread_create(&p,NULL,routine,NULL)!=0)
6899 return 1;
6900 (void)pthread_detach(p);
6901 return 0;
6902}
6903
6904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 ac_cv_kthread=yes
6907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912fi
6913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914CC="$ac_save_cc"
6915fi
6916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6918$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
6920
6921if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6922then
6923# -pthread, if available, provides the right #defines
6924# and linker options to make pthread_create available
6925# Some compilers won't report that they do not support -pthread,
6926# so we need to run a program to see whether it really made the
6927# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6929$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006930if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932else
6933 ac_save_cc="$CC"
6934CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 ac_cv_pthread=no
6937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939/* end confdefs.h. */
6940
Stefan Krah7dba5942012-11-22 22:49:11 +01006941#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942#include <pthread.h>
6943
6944void* routine(void* p){return NULL;}
6945
6946int main(){
6947 pthread_t p;
6948 if(pthread_create(&p,NULL,routine,NULL)!=0)
6949 return 1;
6950 (void)pthread_detach(p);
6951 return 0;
6952}
6953
6954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006955if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956 ac_cv_pthread=yes
6957else
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962fi
6963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964CC="$ac_save_cc"
6965fi
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6968$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969fi
6970
6971# If we have set a CC compiler flag for thread support then
6972# check if it works for CXX, too.
6973ac_cv_cxx_thread=no
6974if test ! -z "$CXX"
6975then
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6977$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978ac_save_cxx="$CXX"
6979
6980if test "$ac_cv_kpthread" = "yes"
6981then
6982 CXX="$CXX -Kpthread"
6983 ac_cv_cxx_thread=yes
6984elif test "$ac_cv_kthread" = "yes"
6985then
6986 CXX="$CXX -Kthread"
6987 ac_cv_cxx_thread=yes
6988elif test "$ac_cv_pthread" = "yes"
6989then
6990 CXX="$CXX -pthread"
6991 ac_cv_cxx_thread=yes
6992fi
6993
6994if test $ac_cv_cxx_thread = yes
6995then
6996 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6997 $CXX -c conftest.$ac_ext 2>&5
6998 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6999 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7000 then
7001 ac_cv_cxx_thread=yes
7002 else
7003 ac_cv_cxx_thread=no
7004 fi
7005 rm -fr conftest*
7006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7008$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
7010CXX="$ac_save_cxx"
7011
7012
7013# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7015$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007016if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020/* end confdefs.h. */
7021#include <stdlib.h>
7022#include <stdarg.h>
7023#include <string.h>
7024#include <float.h>
7025
7026int
7027main ()
7028{
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035 ac_cv_header_stdc=yes
7036else
Matthias Kloseb9621712010-04-24 17:59:49 +00007037 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040
7041if test $ac_cv_header_stdc = yes; then
7042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044/* end confdefs.h. */
7045#include <string.h>
7046
7047_ACEOF
7048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 $EGREP "memchr" >/dev/null 2>&1; then :
7050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051else
7052 ac_cv_header_stdc=no
7053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007054rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055
7056fi
7057
7058if test $ac_cv_header_stdc = yes; then
7059 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007061/* end confdefs.h. */
7062#include <stdlib.h>
7063
7064_ACEOF
7065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 $EGREP "free" >/dev/null 2>&1; then :
7067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068else
7069 ac_cv_header_stdc=no
7070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007071rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072
7073fi
7074
7075if test $ac_cv_header_stdc = yes; then
7076 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078 :
7079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081/* end confdefs.h. */
7082#include <ctype.h>
7083#include <stdlib.h>
7084#if ((' ' & 0x0FF) == 0x020)
7085# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7086# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7087#else
7088# define ISLOWER(c) \
7089 (('a' <= (c) && (c) <= 'i') \
7090 || ('j' <= (c) && (c) <= 'r') \
7091 || ('s' <= (c) && (c) <= 'z'))
7092# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7093#endif
7094
7095#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7096int
7097main ()
7098{
7099 int i;
7100 for (i = 0; i < 256; i++)
7101 if (XOR (islower (i), ISLOWER (i))
7102 || toupper (i) != TOUPPER (i))
7103 return 2;
7104 return 0;
7105}
7106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007107if ac_fn_c_try_run "$LINENO"; then :
7108
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114fi
7115
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116fi
7117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7119$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007120if test $ac_cv_header_stdc = yes; then
7121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123
7124fi
7125
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007126for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007127fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007128ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007129sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007130unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007131poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007132sys/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 +01007133sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007134sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007135sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007136sys/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 -07007137libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007138bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7139sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007140do :
7141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
7147
7148fi
7149
Guido van Rossum627b2d71993-12-24 10:39:16 +00007150done
7151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007153for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7156$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007157if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162#include <sys/types.h>
7163#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165int
7166main ()
7167{
7168if ((DIR *) 0)
7169return 0;
7170 ;
7171 return 0;
7172}
7173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181eval ac_res=\$$as_ac_Header
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7183$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007184if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007186#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
7188
7189ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007192done
7193# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7194if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7196$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007197if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007199else
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204/* Override any GCC internal prototype to avoid an error.
7205 Use char because int might match the return type of a GCC
7206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007207#ifdef __cplusplus
7208extern "C"
7209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007210char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007211int
7212main ()
7213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ;
7216 return 0;
7217}
7218_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007219for ac_lib in '' dir; do
7220 if test -z "$ac_lib"; then
7221 ac_res="none required"
7222 else
7223 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007224 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007225 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007229rm -f core conftest.err conftest.$ac_objext \
7230 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007231 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007234done
Victor Stinnere0be4232011-10-25 13:06:09 +02007235if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237else
7238 ac_cv_search_opendir=no
7239fi
7240rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007241LIBS=$ac_func_search_save_LIBS
7242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7244$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007245ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007246if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7253$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007254if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007256else
7257 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007261/* Override any GCC internal prototype to avoid an error.
7262 Use char because int might match the return type of a GCC
7263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007264#ifdef __cplusplus
7265extern "C"
7266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007267char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007268int
7269main ()
7270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ;
7273 return 0;
7274}
7275_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007276for ac_lib in '' x; do
7277 if test -z "$ac_lib"; then
7278 ac_res="none required"
7279 else
7280 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core conftest.err conftest.$ac_objext \
7287 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007288 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007291done
Victor Stinnere0be4232011-10-25 13:06:09 +02007292if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294else
7295 ac_cv_search_opendir=no
7296fi
7297rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007298LIBS=$ac_func_search_save_LIBS
7299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7301$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007303if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306fi
7307
7308fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7311$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007314else
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007316/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007317#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007318int
7319main ()
7320{
7321return makedev(0, 0);
7322 ;
7323 return 0;
7324}
7325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327 ac_cv_header_sys_types_h_makedev=yes
7328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331rm -f core conftest.err conftest.$ac_objext \
7332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007333
7334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7336$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007337
7338if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007339ac_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 +02007340if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343
7344fi
7345
7346
7347
7348 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007349 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 +02007350if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007353
7354fi
7355
7356
7357 fi
7358fi
7359
Michael W. Hudson54241132001-12-07 15:38:26 +00007360
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007361# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7362for ac_header in net/if.h
7363do :
7364 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7365#ifdef STDC_HEADERS
7366# include <stdlib.h>
7367# include <stddef.h>
7368#else
7369# ifdef HAVE_STDLIB_H
7370# include <stdlib.h>
7371# endif
7372#endif
7373#ifdef HAVE_SYS_SOCKET_H
7374# include <sys/socket.h>
7375#endif
7376
7377"
Victor Stinnere0be4232011-10-25 13:06:09 +02007378if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007379 cat >>confdefs.h <<_ACEOF
7380#define HAVE_NET_IF_H 1
7381_ACEOF
7382
7383fi
7384
7385done
7386
7387
Martin v. Löwis11017b12006-01-14 18:12:57 +00007388# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007389for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007390do :
7391 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 +00007392#ifdef HAVE_ASM_TYPES_H
7393#include <asm/types.h>
7394#endif
7395#ifdef HAVE_SYS_SOCKET_H
7396#include <sys/socket.h>
7397#endif
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399"
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007401 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007402#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007403_ACEOF
7404
7405fi
7406
7407done
7408
7409
Charles-François Natali47413c12011-10-06 19:47:44 +02007410# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007411for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007412do :
7413 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7414ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7415#ifdef HAVE_SYS_SOCKET_H
7416#include <sys/socket.h>
7417#endif
7418
7419"
7420if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7421 cat >>confdefs.h <<_ACEOF
7422#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7423_ACEOF
7424
7425fi
7426
7427done
7428
7429
Guido van Rossum627b2d71993-12-24 10:39:16 +00007430# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007431was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7433$as_echo_n "checking for clock_t in time.h... " >&6; }
7434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007437
7438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007441 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007442else
Martin v. Löwis11437992002-04-12 09:54:03 +00007443
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007447
Guido van Rossum627b2d71993-12-24 10:39:16 +00007448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007449rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7452$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007453
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7455$as_echo_n "checking for makedev... " >&6; }
7456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007458
Jesus Cea740f53a2010-04-28 11:35:30 +00007459#if defined(MAJOR_IN_MKDEV)
7460#include <sys/mkdev.h>
7461#elif defined(MAJOR_IN_SYSMACROS)
7462#include <sys/sysmacros.h>
7463#else
7464#include <sys/types.h>
7465#endif
7466
Neal Norwitz11690112002-07-30 01:08:28 +00007467int
7468main ()
7469{
Jesus Cea740f53a2010-04-28 11:35:30 +00007470
7471 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007472 ;
7473 return 0;
7474}
Matthias Kloseb159a552010-04-25 21:00:44 +00007475
Neal Norwitz11690112002-07-30 01:08:28 +00007476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007477if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007478 ac_cv_has_makedev=yes
7479else
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007482rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7485$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007486if test "$ac_cv_has_makedev" = "yes"; then
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007489
7490fi
7491
Christian Heimes985ecdc2013-11-20 11:46:18 +01007492# byte swapping
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7494$as_echo_n "checking for le64toh... " >&6; }
7495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496/* end confdefs.h. */
7497
7498#ifdef HAVE_ENDIAN_H
7499#include <endian.h>
7500#elif defined(HAVE_SYS_ENDIAN_H)
7501#include <sys/endian.h>
7502#endif
7503
7504int
7505main ()
7506{
7507
7508 le64toh(1)
7509 ;
7510 return 0;
7511}
7512
7513_ACEOF
7514if ac_fn_c_try_link "$LINENO"; then :
7515 ac_cv_has_le64toh=yes
7516else
7517 ac_cv_has_le64toh=no
7518fi
7519rm -f core conftest.err conftest.$ac_objext \
7520 conftest$ac_exeext conftest.$ac_ext
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7522$as_echo "$ac_cv_has_le64toh" >&6; }
7523if test "$ac_cv_has_le64toh" = "yes"; then
7524
7525$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7526
7527fi
7528
Martin v. Löwis399a6892002-10-04 10:22:02 +00007529# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7530# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7531# defined, but the compiler does not support pragma redefine_extname,
7532# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7533# structures (such as rlimit64) without declaring them. As a
7534# work-around, disable LFS on such configurations
7535
7536use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7538$as_echo_n "checking Solaris LFS bug... " >&6; }
7539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007541
7542#define _LARGEFILE_SOURCE 1
7543#define _FILE_OFFSET_BITS 64
7544#include <sys/resource.h>
7545
Martin v. Löwis399a6892002-10-04 10:22:02 +00007546int
7547main ()
7548{
7549struct rlimit foo;
7550 ;
7551 return 0;
7552}
7553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007555 sol_lfs_bug=no
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7561$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007562if test "$sol_lfs_bug" = "yes"; then
7563 use_lfs=no
7564fi
7565
7566if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007567# Two defines needed to enable largefile support on various platforms
7568# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007569case $ac_sys_system/$ac_sys_release in
7570AIX*)
7571
7572$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7573
7574 ;;
7575esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007578
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007581
Martin v. Löwis399a6892002-10-04 10:22:02 +00007582fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Guido van Rossum84e7b241996-08-19 21:59:00 +00007584# Add some code to confdefs.h so that the test for off_t works on SCO
7585cat >> confdefs.h <<\EOF
7586#if defined(SCO_DS)
7587#undef _OFF_T
7588#endif
7589EOF
7590
Guido van Rossumef2255b2000-03-10 22:30:29 +00007591# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007592ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596
7597cat >>confdefs.h <<_ACEOF
7598#define mode_t int
7599_ACEOF
7600
7601fi
7602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606else
Martin v. Löwis11437992002-04-12 09:54:03 +00007607
7608cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007610_ACEOF
7611
7612fi
7613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007615if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007616
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007617else
Martin v. Löwis11437992002-04-12 09:54:03 +00007618
7619cat >>confdefs.h <<_ACEOF
7620#define pid_t int
7621_ACEOF
7622
7623fi
7624
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007627#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007628_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633else
Martin v. Löwis11437992002-04-12 09:54:03 +00007634
7635cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007637_ACEOF
7638
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7642$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
7650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007653 ac_cv_type_uid_t=yes
7654else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007655 ac_cv_type_uid_t=no
7656fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007657rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007658
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7661$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007662if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663
Matthias Kloseb9621712010-04-24 17:59:49 +00007664$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
7666
Matthias Kloseb9621712010-04-24 17:59:49 +00007667$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668
7669fi
7670
Mark Dickinson983bc162012-12-02 12:11:38 +00007671
7672# There are two separate checks for each of the exact-width integer types we
7673# need. First we check whether the type is available using the usual
7674# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7675# and <stdint.h> where available). We then also use the special type checks of
7676# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7677# directly, #define's uint32_t to be a suitable type.
7678
7679ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7680if test "x$ac_cv_type_uint32_t" = xyes; then :
7681
7682$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7683
7684fi
7685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7687case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007688 no|yes) ;; #(
7689 *)
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007692
7693
7694cat >>confdefs.h <<_ACEOF
7695#define uint32_t $ac_cv_c_uint32_t
7696_ACEOF
7697;;
7698 esac
7699
Mark Dickinson983bc162012-12-02 12:11:38 +00007700
7701ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7702if test "x$ac_cv_type_uint64_t" = xyes; then :
7703
7704$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7705
7706fi
7707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7709case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007710 no|yes) ;; #(
7711 *)
7712
Matthias Kloseb9621712010-04-24 17:59:49 +00007713$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007714
7715
7716cat >>confdefs.h <<_ACEOF
7717#define uint64_t $ac_cv_c_uint64_t
7718_ACEOF
7719;;
7720 esac
7721
Mark Dickinson983bc162012-12-02 12:11:38 +00007722
7723ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7724if test "x$ac_cv_type_int32_t" = xyes; then :
7725
7726$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7727
7728fi
7729
Matthias Kloseb9621712010-04-24 17:59:49 +00007730ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7731case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007732 no|yes) ;; #(
7733 *)
7734
7735cat >>confdefs.h <<_ACEOF
7736#define int32_t $ac_cv_c_int32_t
7737_ACEOF
7738;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007739esac
7740
Mark Dickinson983bc162012-12-02 12:11:38 +00007741
7742ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7743if test "x$ac_cv_type_int64_t" = xyes; then :
7744
7745$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7746
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7750case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007751 no|yes) ;; #(
7752 *)
7753
7754cat >>confdefs.h <<_ACEOF
7755#define int64_t $ac_cv_c_int64_t
7756_ACEOF
7757;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007758esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007759
Mark Dickinson983bc162012-12-02 12:11:38 +00007760
Matthias Kloseb9621712010-04-24 17:59:49 +00007761ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007765
7766fi
7767
Stefan Krah1919b7e2012-03-21 18:25:23 +01007768ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7769if test "x$ac_cv_type___uint128_t" = xyes; then :
7770
7771$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7772
7773fi
7774
Jack Jansendd19cf82001-12-06 22:36:17 +00007775
Michael W. Hudson54241132001-12-07 15:38:26 +00007776# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007777# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778# The cast to long int works around a bug in the HP C Compiler
7779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7783$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 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 +00007788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 if test "$ac_cv_type_int" = yes; then
7791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007793as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007794See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 else
7796 ac_cv_sizeof_int=0
7797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7802$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803
7804
7805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007807#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007808_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809
7810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811# The cast to long int works around a bug in the HP C Compiler
7812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7816$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 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 +00007821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 if test "$ac_cv_type_long" = yes; then
7824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007826as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 else
7829 ac_cv_sizeof_long=0
7830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7835$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836
7837
7838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842
7843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7849$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 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 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if test "$ac_cv_type_void_p" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007860See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof_void_p=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7868$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869
7870
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007873#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007875
7876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877# The cast to long int works around a bug in the HP C Compiler
7878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7882$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 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 +00007887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$ac_cv_type_short" = yes; then
7890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007892as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007893See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 else
7895 ac_cv_sizeof_short=0
7896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7901$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007906#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007908
7909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7915$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007916if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 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 +00007920
Martin v. Löwis11437992002-04-12 09:54:03 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 if test "$ac_cv_type_float" = yes; then
7923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007925as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007926See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 else
7928 ac_cv_sizeof_float=0
7929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931
Martin v. Löwis11437992002-04-12 09:54:03 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7934$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935
7936
7937
Martin v. Löwis11437992002-04-12 09:54:03 +00007938cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007939#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007940_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007941
7942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7948$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 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 +00007953
Martin v. Löwis11437992002-04-12 09:54:03 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 if test "$ac_cv_type_double" = yes; then
7956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007959See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 else
7961 ac_cv_sizeof_double=0
7962 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7967$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968
7969
7970
Martin v. Löwis11437992002-04-12 09:54:03 +00007971cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007972#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007973_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007974
7975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976# The cast to long int works around a bug in the HP C Compiler
7977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7981$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 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 +00007986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 if test "$ac_cv_type_fpos_t" = yes; then
7989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007991as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007992See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 else
7994 ac_cv_sizeof_fpos_t=0
7995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8000$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001
8002
8003
Martin v. Löwis11437992002-04-12 09:54:03 +00008004cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008005#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8014$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +00008019
Martin v. Löwis18e16552006-02-15 17:27:45 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 if test "$ac_cv_type_size_t" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008025See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 else
8027 ac_cv_sizeof_size_t=0
8028 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030
Martin v. Löwis18e16552006-02-15 17:27:45 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8033$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034
8035
8036
Martin v. Löwis18e16552006-02-15 17:27:45 +00008037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8039_ACEOF
8040
8041
Christian Heimes400adb02008-02-01 08:12:03 +00008042# The cast to long int works around a bug in the HP C Compiler
8043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8047$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 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 +00008052
Christian Heimes400adb02008-02-01 08:12:03 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 if test "$ac_cv_type_pid_t" = yes; then
8055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008057as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008058See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008059 else
8060 ac_cv_sizeof_pid_t=0
8061 fi
8062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Christian Heimes400adb02008-02-01 08:12:03 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8066$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008067
8068
8069
8070cat >>confdefs.h <<_ACEOF
8071#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8072_ACEOF
8073
8074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8077$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008078have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008085long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
8089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008095 have_long_long=yes
8096
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8100$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008101if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102# The cast to long int works around a bug in the HP C Compiler
8103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8107$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008108if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008110else
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 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 +00008112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 if test "$ac_cv_type_long_long" = yes; then
8115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008117as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008118See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 else
8120 ac_cv_sizeof_long_long=0
8121 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8126$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127
8128
8129
Martin v. Löwis11437992002-04-12 09:54:03 +00008130cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008131#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008132_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008133
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008135fi
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8138$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008139have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008141/* end confdefs.h. */
8142
8143int
8144main ()
8145{
8146long double x; x = (long double)0;
8147 ;
8148 return 0;
8149}
8150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008152
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008155
8156 have_long_double=yes
8157
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008158fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8161$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008162if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8168$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 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 +00008173
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if test "$ac_cv_type_long_double" = yes; then
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008178as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008179See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008180 else
8181 ac_cv_sizeof_long_double=0
8182 fi
8183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8187$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008188
8189
8190
8191cat >>confdefs.h <<_ACEOF
8192#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8193_ACEOF
8194
8195
8196fi
8197
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8200$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008201have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008203/* end confdefs.h. */
8204
8205int
8206main ()
8207{
8208_Bool x; x = (_Bool)0;
8209 ;
8210 return 0;
8211}
8212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008214
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008217
8218 have_c99_bool=yes
8219
Thomas Woutersb2137042007-02-01 18:02:27 +00008220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8223$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008224if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8230$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 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 +00008235
Thomas Woutersb2137042007-02-01 18:02:27 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type__Bool" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof__Bool=0
8244 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Thomas Woutersb2137042007-02-01 18:02:27 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8249$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Thomas Woutersb2137042007-02-01 18:02:27 +00008253cat >>confdefs.h <<_ACEOF
8254#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8255_ACEOF
8256
8257
8258fi
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008261 #include <stdint.h>
8262 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008263 #ifdef HAVE_INTTYPES_H
8264 #include <inttypes.h>
8265 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008266"
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008268
8269cat >>confdefs.h <<_ACEOF
8270#define HAVE_UINTPTR_T 1
8271_ACEOF
8272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273# The cast to long int works around a bug in the HP C Compiler
8274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8278$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 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 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 if test "$ac_cv_type_uintptr_t" = yes; then
8286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008289See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 else
8291 ac_cv_sizeof_uintptr_t=0
8292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8297$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
8299
8300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008302#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008303_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008304
Michael W. Hudson54241132001-12-07 15:38:26 +00008305
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008306fi
8307
Thomas Wouters89f507f2006-12-13 04:49:30 +00008308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008309# The cast to long int works around a bug in the HP C Compiler
8310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8314$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319#ifdef HAVE_SYS_TYPES_H
8320#include <sys/types.h>
8321#endif
8322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 if test "$ac_cv_type_off_t" = yes; then
8327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008329as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008330See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008331 else
8332 ac_cv_sizeof_off_t=0
8333 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8338$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008343#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008345
Michael W. Hudson54241132001-12-07 15:38:26 +00008346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8349$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008350if test "$have_long_long" = yes
8351then
8352if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008353 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8358$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008362fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008363else
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8365$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008366fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008368# The cast to long int works around a bug in the HP C Compiler
8369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8371# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8373$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008378#ifdef HAVE_SYS_TYPES_H
8379#include <sys/types.h>
8380#endif
8381#ifdef HAVE_TIME_H
8382#include <time.h>
8383#endif
8384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 if test "$ac_cv_type_time_t" = yes; then
8389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008391as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008392See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008393 else
8394 ac_cv_sizeof_time_t=0
8395 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008397
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8400$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008402
8403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008405#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008406_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008407
Michael W. Hudson54241132001-12-07 15:38:26 +00008408
8409
Trent Mick635f6fb2000-08-23 21:33:05 +00008410# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008411ac_save_cc="$CC"
8412if test "$ac_cv_kpthread" = "yes"
8413then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008414elif test "$ac_cv_kthread" = "yes"
8415then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416elif test "$ac_cv_pthread" = "yes"
8417then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008418fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8421$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008422have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008425
8426 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Guido van Rossum12580492000-09-24 16:47:19 +00008430pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ;
8432 return 0;
8433}
Matthias Kloseb159a552010-04-25 21:00:44 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008436if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008437 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8441$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008442if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8448$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008453#ifdef HAVE_PTHREAD_H
8454#include <pthread.h>
8455#endif
8456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008458
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 if test "$ac_cv_type_pthread_t" = yes; then
8461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008463as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008464See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008465 else
8466 ac_cv_sizeof_pthread_t=0
8467 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469
Trent Mick635f6fb2000-08-23 21:33:05 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8472$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008474
8475
Martin v. Löwis11437992002-04-12 09:54:03 +00008476cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008477#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008478_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008479
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008480
Trent Mick635f6fb2000-08-23 21:33:05 +00008481fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008482CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008483
Michael W. Hudson54241132001-12-07 15:38:26 +00008484
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008485case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008486 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008487 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8488 ;;
8489 Darwin/*)
8490 OTHER_LIBTOOL_OPT=""
8491 ;;
8492esac
8493
8494
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008495
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008496case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008497 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8499 if test "${enable_universalsdk}"; then
8500 :
8501 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008502 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008503 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008504 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008505 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008506 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008507 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008508 if test ${gcc_version} '<' 4.0
8509 then
8510 LIBTOOL_CRUFT="-lcc_dynamic"
8511 else
8512 LIBTOOL_CRUFT=""
8513 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008515 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008518/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008519
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008520 #include <unistd.h>
8521 int main(int argc, char*argv[])
8522 {
8523 if (sizeof(long) == 4) {
8524 return 0;
8525 } else {
8526 return 1;
8527 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008528 }
8529
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008531if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008532 ac_osx_32bit=yes
8533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008538fi
8539
8540
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008541 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008542 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008543 i386)
8544 MACOSX_DEFAULT_ARCH="i386"
8545 ;;
8546 ppc)
8547 MACOSX_DEFAULT_ARCH="ppc"
8548 ;;
8549 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551 ;;
8552 esac
8553 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008554 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008555 i386)
8556 MACOSX_DEFAULT_ARCH="x86_64"
8557 ;;
8558 ppc)
8559 MACOSX_DEFAULT_ARCH="ppc64"
8560 ;;
8561 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008563 ;;
8564 esac
8565
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008566 fi
8567
8568 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008569 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008570 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008571esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8573$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008574if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008576 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008578 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008579
Matthias Kloseb9621712010-04-24 17:59:49 +00008580$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8583$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008584 if test $enable_shared = "yes"
8585 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008586 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 +00008587 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008591fi
8592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8594$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008595case $ac_sys_system/$ac_sys_release in
8596 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8601$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008602 ;;
8603 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008606 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008607esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008608
Guido van Rossum0a516c91994-09-12 10:58:40 +00008609# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610
Michael W. Hudson54241132001-12-07 15:38:26 +00008611
8612
8613
8614
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615
Thomas Wouters477c8d52006-05-27 19:21:47 +00008616
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008617# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8618# -- usually .so, .sl on HP-UX, .dll on Cygwin
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8620$as_echo_n "checking the extension of shared libraries... " >&6; }
8621if test -z "$SHLIB_SUFFIX"; then
8622 case $ac_sys_system in
8623 hp*|HP*)
8624 case `uname -m` in
8625 ia64) SHLIB_SUFFIX=.so;;
8626 *) SHLIB_SUFFIX=.sl;;
8627 esac
8628 ;;
8629 CYGWIN*) SHLIB_SUFFIX=.dll;;
8630 *) SHLIB_SUFFIX=.so;;
8631 esac
8632fi
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8634$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008635
Guido van Rossum0a516c91994-09-12 10:58:40 +00008636# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008637# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008638# (Shared libraries in this instance are shared modules to be loaded into
8639# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8641$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008642if test -z "$LDSHARED"
8643then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008644 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008645 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008646 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008647 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008648 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008649 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008650 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008652 if test "$GCC" = "yes" ; then
8653 LDSHARED='$(CC) -shared'
8654 LDCXXSHARED='$(CXX) -shared'
8655 else
8656 LDSHARED='$(CC) -G'
8657 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008658 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008659 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008660 if test "$GCC" = "yes" ; then
8661 LDSHARED='$(CC) -shared'
8662 LDCXXSHARED='$(CXX) -shared'
8663 else
8664 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008665 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008666 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008667 LDSHARED='$(CC) -bundle'
8668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008669 if test "$enable_framework" ; then
8670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008674 else
8675 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008676 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008677 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008678 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008679 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008680 LDSHARED='$(CC) -bundle'
8681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008682 if test "$enable_framework" ; then
8683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008687 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008688 # No framework, use the Python app as bundle-loader
8689 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008690 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008691 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008693 Darwin/*)
8694 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8695 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008696
Ned Deily36820b62014-06-25 13:44:22 -07008697 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8698 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8699 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8700 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8701 if test ${dep_target_major} -eq 10 && \
8702 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008703 then
Ned Deily36820b62014-06-25 13:44:22 -07008704 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008705 LDSHARED='$(CC) -bundle'
8706 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008707 if test "$enable_framework" ; then
8708 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008709 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8710 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008711 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008712 else
8713 # No framework, use the Python app as bundle-loader
8714 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8715 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008716 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008717 fi
Ned Deily36820b62014-06-25 13:44:22 -07008718 else
8719 # building for OS X 10.3 and later
8720 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8721 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8722 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008723 fi
8724 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008725 Linux*|GNU*|QNX*)
8726 LDSHARED='$(CC) -shared'
8727 LDCXXSHARED='$(CXX) -shared';;
8728 BSD/OS*/4*)
8729 LDSHARED="gcc -shared"
8730 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008731 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008732 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008733 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008734 LDSHARED='$(CC) -shared'
8735 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008736 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008737 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008738 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008739 OpenBSD*)
8740 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8741 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008742 LDSHARED='$(CC) -shared $(CCSHARED)'
8743 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744 else
8745 case `uname -r` in
8746 [01].* | 2.[0-7] | 2.[0-7].*)
8747 LDSHARED="ld -Bshareable ${LDFLAGS}"
8748 ;;
8749 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008750 LDSHARED='$(CC) -shared $(CCSHARED)'
8751 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008752 ;;
8753 esac
8754 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008755 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008756 LDSHARED='$(CC) -shared'
8757 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008758 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008759 if test "$GCC" = "yes" ; then
8760 LDSHARED='$(CC) -shared'
8761 LDCXXSHARED='$(CXX) -shared'
8762 else
8763 LDSHARED='$(CC) -G'
8764 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008765 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008766 SCO_SV*)
8767 LDSHARED='$(CC) -Wl,-G,-Bexport'
8768 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8769 CYGWIN*)
8770 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8771 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008772 *) LDSHARED="ld";;
8773 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8776$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008777LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008778BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008779# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008780# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8782$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783if test -z "$CCSHARED"
8784then
Guido van Rossum07397971997-04-29 21:49:50 +00008785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008786 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008787 then CCSHARED="-fPIC";
8788 elif test `uname -p` = sparc;
8789 then CCSHARED="-xcode=pic32";
8790 else CCSHARED="-Kpic";
8791 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008792 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008793 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008794 else CCSHARED="+z";
8795 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008796 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008797 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008798 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008799 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 if test "$GCC" = "yes"
8801 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008803 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008804 SCO_SV*)
8805 if test "$GCC" = "yes"
8806 then CCSHARED="-fPIC"
8807 else CCSHARED="-Kpic -belf"
8808 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008809 IRIX*/6*) case $CC in
8810 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008811 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008812 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8816$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008818# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8820$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821if test -z "$LINKFORSHARED"
8822then
Guido van Rossum07397971997-04-29 21:49:50 +00008823 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008824 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008825 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008826 LINKFORSHARED="-Wl,-E -Wl,+s";;
8827# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008828 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008829 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008830 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008832 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008833
8834 # Issue #18075: the default maximum stack size (8MBytes) is too
8835 # small for the default recursion limit. Increase the stack size
8836 # to ensure that tests don't crash
8837 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8838
Jack Jansene578a632001-08-15 01:27:14 +00008839 if test "$enable_framework"
8840 then
Jack Jansenda49e192005-01-07 13:08:22 +00008841 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008842 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008843 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008844 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008845 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008846 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008847 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008848 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8849 then
8850 LINKFORSHARED="-Wl,--export-dynamic"
8851 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008852 SunOS/5*) case $CC in
8853 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008854 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008855 then
8856 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008857 fi;;
8858 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008859 CYGWIN*)
8860 if test $enable_shared = "no"
8861 then
8862 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8863 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008864 QNX*)
8865 # -Wl,-E causes the symbols to be added to the dynamic
8866 # symbol table so that they can be found when a module
8867 # is loaded. -N 2048K causes the stack size to be set
8868 # to 2048 kilobytes so that the stack doesn't overflow
8869 # when running test_compile.py.
8870 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8874$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008875
Michael W. Hudson54241132001-12-07 15:38:26 +00008876
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008877
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8879$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008880if test ! "$LIBRARY" = "$LDLIBRARY"
8881then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008882 case $ac_sys_system in
8883 CYGWIN*)
8884 # Cygwin needs CCSHARED when building extension DLLs
8885 # but not when building the interpreter DLL.
8886 CFLAGSFORSHARED='';;
8887 *)
8888 CFLAGSFORSHARED='$(CCSHARED)'
8889 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8892$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008894# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8895# library (with --enable-shared).
8896# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008897# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8898# if it is not required, since it creates a dependency of the shared library
8899# to LIBS. This, in turn, means that applications linking the shared libpython
8900# don't need to link LIBS explicitly. The default should be only changed
8901# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8904$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008905case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008906 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008907 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008908esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8910$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008911
8912
Guido van Rossum627b2d71993-12-24 10:39:16 +00008913# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8915$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008916if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008917 $as_echo_n "(cached) " >&6
8918else
8919 ac_check_lib_save_LIBS=$LIBS
8920LIBS="-lsendfile $LIBS"
8921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922/* end confdefs.h. */
8923
8924/* Override any GCC internal prototype to avoid an error.
8925 Use char because int might match the return type of a GCC
8926 builtin and then its argument prototype would still apply. */
8927#ifdef __cplusplus
8928extern "C"
8929#endif
8930char sendfile ();
8931int
8932main ()
8933{
8934return sendfile ();
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_lib_sendfile_sendfile=yes
8941else
8942 ac_cv_lib_sendfile_sendfile=no
8943fi
8944rm -f core conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext conftest.$ac_ext
8946LIBS=$ac_check_lib_save_LIBS
8947fi
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8949$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008950if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008951 cat >>confdefs.h <<_ACEOF
8952#define HAVE_LIBSENDFILE 1
8953_ACEOF
8954
8955 LIBS="-lsendfile $LIBS"
8956
8957fi
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8960$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008961if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008963else
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008965LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969/* Override any GCC internal prototype to avoid an error.
8970 Use char because int might match the return type of a GCC
8971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972#ifdef __cplusplus
8973extern "C"
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ;
8981 return 0;
8982}
8983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008989rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8994$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008995if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 cat >>confdefs.h <<_ACEOF
8997#define HAVE_LIBDL 1
8998_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008999
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009000 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009002fi
9003 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9005$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014/* Override any GCC internal prototype to avoid an error.
9015 Use char because int might match the return type of a GCC
9016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009017#ifdef __cplusplus
9018extern "C"
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ;
9026 return 0;
9027}
9028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009036LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9039$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 cat >>confdefs.h <<_ACEOF
9042#define HAVE_LIBDLD 1
9043_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009045 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009047fi
9048 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9050$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9051if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9052 $as_echo_n "(cached) " >&6
9053else
9054 ac_check_lib_save_LIBS=$LIBS
9055LIBS="-lcrypto $LIBS"
9056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9057/* end confdefs.h. */
9058
9059/* Override any GCC internal prototype to avoid an error.
9060 Use char because int might match the return type of a GCC
9061 builtin and then its argument prototype would still apply. */
9062#ifdef __cplusplus
9063extern "C"
9064#endif
9065char RAND_egd ();
9066int
9067main ()
9068{
9069return RAND_egd ();
9070 ;
9071 return 0;
9072}
9073_ACEOF
9074if ac_fn_c_try_link "$LINENO"; then :
9075 ac_cv_lib_crypto_RAND_egd=yes
9076else
9077 ac_cv_lib_crypto_RAND_egd=no
9078fi
9079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext conftest.$ac_ext
9081LIBS=$ac_check_lib_save_LIBS
9082fi
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9084$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9085if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9086
9087$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9088
9089fi
9090
Martin v. Löwis519adae2003-09-20 10:47:47 +00009091
Georg Brandlb1441c72009-01-03 22:33:39 +00009092# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009093if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9095$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009096if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009098else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009099 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103/* Override any GCC internal prototype to avoid an error.
9104 Use char because int might match the return type of a GCC
9105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009106#ifdef __cplusplus
9107extern "C"
9108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009109char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009110int
9111main ()
9112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ;
9115 return 0;
9116}
9117_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118for ac_lib in '' pthread rt posix4; do
9119 if test -z "$ac_lib"; then
9120 ac_res="none required"
9121 else
9122 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009123 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009128rm -f core conftest.err conftest.$ac_objext \
9129 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009130 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133done
Victor Stinnere0be4232011-10-25 13:06:09 +02009134if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136else
9137 ac_cv_search_sem_init=no
9138fi
9139rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009140LIBS=$ac_func_search_save_LIBS
9141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9143$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009145if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009147
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009148fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009149 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009150 # posix4 on Solaris 2.6
9151 # pthread (first!) on Linux
9152fi
9153
Martin v. Löwis19d17342003-06-14 21:03:05 +00009154# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9156$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009157if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009159else
9160 ac_check_lib_save_LIBS=$LIBS
9161LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009163/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165/* Override any GCC internal prototype to avoid an error.
9166 Use char because int might match the return type of a GCC
9167 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009168#ifdef __cplusplus
9169extern "C"
9170#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009171char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009172int
9173main ()
9174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009176 ;
9177 return 0;
9178}
9179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009181 ac_cv_lib_intl_textdomain=yes
9182else
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185rm -f core conftest.err conftest.$ac_objext \
9186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009187LIBS=$ac_check_lib_save_LIBS
9188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9190$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009191if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009194
Brett Cannonc6d936e2009-06-07 20:09:53 +00009195 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009196fi
9197
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009198
9199# checks for system dependent C++ extensions support
9200case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9202$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009205
Georg Brandl59e87bd2011-02-15 19:48:59 +00009206 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009207int
9208main ()
9209{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009210loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 ;
9212 return 0;
9213}
Matthias Kloseb159a552010-04-25 21:00:44 +00009214
Martin v. Löwis11437992002-04-12 09:54:03 +00009215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009217
Matthias Kloseb159a552010-04-25 21:00:44 +00009218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009220
Matthias Kloseb159a552010-04-25 21:00:44 +00009221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009223
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009224else
Matthias Kloseb159a552010-04-25 21:00:44 +00009225
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009227$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230rm -f core conftest.err conftest.$ac_objext \
9231 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009232 *) ;;
9233esac
9234
Christian Heimes985ecdc2013-11-20 11:46:18 +01009235# check for systems that require aligned memory access
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9237$as_echo_n "checking aligned memory access is required... " >&6; }
9238if test "$cross_compiling" = yes; then :
9239 aligned_required=yes
9240else
9241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9242/* end confdefs.h. */
9243
9244int main()
9245{
9246 char s[16];
9247 int i, *p1, *p2;
9248 for (i=0; i < 16; i++)
9249 s[i] = i;
9250 p1 = (int*)(s+1);
9251 p2 = (int*)(s+2);
9252 if (*p1 == *p2)
9253 return 1;
9254 return 0;
9255}
9256
9257_ACEOF
9258if ac_fn_c_try_run "$LINENO"; then :
9259 aligned_required=no
9260else
9261 aligned_required=yes
9262fi
9263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9264 conftest.$ac_objext conftest.beam conftest.$ac_ext
9265fi
9266
9267
9268if test "$aligned_required" = yes ; then
9269
9270$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9271
9272fi
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9274$as_echo "$aligned_required" >&6; }
9275
9276
9277# str, bytes and memoryview hash algorithm
9278
9279
9280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9281$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9282
9283# Check whether --with-hash_algorithm was given.
9284if test "${with_hash_algorithm+set}" = set; then :
9285 withval=$with_hash_algorithm;
9286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9287$as_echo "$withval" >&6; }
9288case "$withval" in
9289 siphash24)
9290 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9291
9292 ;;
9293 fnv)
9294 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9295
9296 ;;
9297 *)
9298 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9299 ;;
9300esac
9301
9302else
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9304$as_echo "default" >&6; }
9305fi
9306
9307
Charles-François Natalid30b0222014-05-08 23:08:51 +01009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9309$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9310
9311# Check whether --with-address_sanitizer was given.
9312if test "${with_address_sanitizer+set}" = set; then :
9313 withval=$with_address_sanitizer;
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9315$as_echo "$withval" >&6; }
9316BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9317LDFLAGS="-fsanitize=address $LDFLAGS"
9318
9319else
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321$as_echo "no" >&6; }
9322fi
9323
9324
Guido van Rossum70c7f481998-03-26 18:44:10 +00009325# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9327$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009328if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009330else
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009332LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336/* Override any GCC internal prototype to avoid an error.
9337 Use char because int might match the return type of a GCC
9338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009339#ifdef __cplusplus
9340extern "C"
9341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009342char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ;
9348 return 0;
9349}
9350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009351if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009356rm -f core conftest.err conftest.$ac_objext \
9357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9361$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009362if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009363 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009364fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009365 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9367$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009368if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009370else
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009372LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376/* Override any GCC internal prototype to avoid an error.
9377 Use char because int might match the return type of a GCC
9378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009379#ifdef __cplusplus
9380extern "C"
9381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009382char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009383int
9384main ()
9385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ;
9388 return 0;
9389}
9390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009393else
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009396rm -f core conftest.err conftest.$ac_objext \
9397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9401$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009402if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009403 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009404fi
9405 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9408$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009411if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9414$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009415LIBS="$withval $LIBS"
9416
9417else
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420fi
9421
Guido van Rossum7f43da71994-08-01 12:15:30 +00009422
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009423if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009424 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9425set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009428if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009430else
9431 case $PKG_CONFIG in
9432 [\\/]* | ?:[\\/]*)
9433 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9434 ;;
9435 *)
9436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439 IFS=$as_save_IFS
9440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009441 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009442 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009443 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009445 break 2
9446 fi
9447done
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009449IFS=$as_save_IFS
9450
9451 ;;
9452esac
9453fi
9454PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9455if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9457$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009461fi
9462
9463
9464fi
9465if test -z "$ac_cv_path_PKG_CONFIG"; then
9466 ac_pt_PKG_CONFIG=$PKG_CONFIG
9467 # Extract the first word of "pkg-config", so it can be a program name with args.
9468set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9470$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009471if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009473else
9474 case $ac_pt_PKG_CONFIG in
9475 [\\/]* | ?:[\\/]*)
9476 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9477 ;;
9478 *)
9479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9480for as_dir in $PATH
9481do
9482 IFS=$as_save_IFS
9483 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009486 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009488 break 2
9489 fi
9490done
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009492IFS=$as_save_IFS
9493
9494 ;;
9495esac
9496fi
9497ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9498if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9500$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009504fi
9505
9506 if test "x$ac_pt_PKG_CONFIG" = x; then
9507 PKG_CONFIG=""
9508 else
9509 case $cross_compiling:$ac_tool_warned in
9510yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009513ac_tool_warned=yes ;;
9514esac
9515 PKG_CONFIG=$ac_pt_PKG_CONFIG
9516 fi
9517else
9518 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9519fi
9520
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009521
9522# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9524$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009525
9526# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009528 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009529else
9530 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009531fi
9532
9533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9535$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009536
9537# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9539$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009540
9541# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009543 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009544else
9545 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009546fi
9547
9548
9549if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009550 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9551else
9552 LIBFFI_INCLUDEDIR=""
9553fi
9554
9555
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9557$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009558
Stefan Krah60187b52012-03-23 19:06:27 +01009559# Check for use of the system libmpdec library
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9561$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9562
9563# Check whether --with-system_libmpdec was given.
9564if test "${with_system_libmpdec+set}" = set; then :
9565 withval=$with_system_libmpdec;
9566else
9567 with_system_libmpdec="no"
9568fi
9569
9570
9571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9572$as_echo "$with_system_libmpdec" >&6; }
9573
Benjamin Peterson076ed002010-10-31 17:11:02 +00009574# Check for support for loadable sqlite extensions
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9576$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9577# Check whether --enable-loadable-sqlite-extensions was given.
9578if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9579 enableval=$enable_loadable_sqlite_extensions;
9580else
9581 enable_loadable_sqlite_extensions="no"
9582fi
9583
9584
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9586$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9587
Ned Deilyd819b932013-09-06 01:07:05 -07009588# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9589
9590
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9592$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9593
9594# Check whether --with-tcltk-includes was given.
9595if test "${with_tcltk_includes+set}" = set; then :
9596 withval=$with_tcltk_includes;
9597else
9598 with_tcltk_includes="default"
9599fi
9600
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9602$as_echo "$with_tcltk_includes" >&6; }
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9604$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9605
9606# Check whether --with-tcltk-libs was given.
9607if test "${with_tcltk_libs+set}" = set; then :
9608 withval=$with_tcltk_libs;
9609else
9610 with_tcltk_libs="default"
9611fi
9612
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9614$as_echo "$with_tcltk_libs" >&6; }
9615if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9616then
9617 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9618 then
9619 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9620 fi
9621 TCLTK_INCLUDES=""
9622 TCLTK_LIBS=""
9623else
9624 TCLTK_INCLUDES="$with_tcltk_includes"
9625 TCLTK_LIBS="$with_tcltk_libs"
9626fi
9627
Matthias Klose55708cc2009-04-30 08:06:49 +00009628# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9630$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009631
9632# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009633if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009634 withval=$with_dbmliborder;
9635if test x$with_dbmliborder = xyes
9636then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009637as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009638else
9639 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9640 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9641 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009642 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009643 fi
9644 done
9645fi
9646fi
9647
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9649$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009650
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009651# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009652
9653
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9655$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009658if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 withval=$with_signal_module;
9660fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009661
9662
9663if test -z "$with_signal_module"
9664then with_signal_module="yes"
9665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9667$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009668
9669if test "${with_signal_module}" = "yes"; then
9670 USE_SIGNAL_MODULE=""
9671 SIGNAL_OBJS=""
9672else
9673 USE_SIGNAL_MODULE="#"
9674 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9675fi
9676
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009677# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009678
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009679USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
9683# Templates for things AC_DEFINEd more than once.
9684# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009685
9686
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9689$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009692if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693 withval=$with_threads;
9694fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009695
9696
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009697# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009700if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 withval=$with_thread; with_threads=$with_thread
9702fi
9703
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009704
9705if test -z "$with_threads"
9706then with_threads="yes"
9707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9709$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009711
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009712if test "$with_threads" = "no"
9713then
9714 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009715elif test "$ac_cv_pthread_is_default" = yes
9716then
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009718
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009719 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009721
9722 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009724elif test "$ac_cv_kpthread" = "yes"
9725then
9726 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009727 if test "$ac_cv_cxx_thread" = "yes"; then
9728 CXX="$CXX -Kpthread"
9729 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009731
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009732 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009733 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009734elif test "$ac_cv_kthread" = "yes"
9735then
9736 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009737 if test "$ac_cv_cxx_thread" = "yes"; then
9738 CXX="$CXX -Kthread"
9739 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009741
9742 posix_threads=yes
9743 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744elif test "$ac_cv_pthread" = "yes"
9745then
9746 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009747 if test "$ac_cv_cxx_thread" = "yes"; then
9748 CXX="$CXX -pthread"
9749 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009751
9752 posix_threads=yes
9753 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009754else
9755 if test ! -z "$with_threads" -a -d "$with_threads"
9756 then LDFLAGS="$LDFLAGS -L$with_threads"
9757 fi
9758 if test ! -z "$withval" -a -d "$withval"
9759 then LDFLAGS="$LDFLAGS -L$withval"
9760 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009761
9762 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009763 # define _POSIX_THREADS in unistd.h. Some apparently don't
9764 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9766$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009768/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009769
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009770#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009771#ifdef _POSIX_THREADS
9772yes
9773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009774
9775_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009778 unistd_defines_pthreads=yes
9779else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009780 unistd_defines_pthreads=no
9781fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009782rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9785$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009786
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009788
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009789 # Just looking for pthread_create in libpthread is not enough:
9790 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9791 # So we really have to include pthread.h, and then link.
9792 _libs=$LIBS
9793 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9795$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009798
9799#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009800#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009801
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009802void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009806
9807pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 ;
9809 return 0;
9810}
9811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9815$as_echo "yes" >&6; }
9816 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009817
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009818 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009819 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009822 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009826
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009827 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009828 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009829else
Guido van Rossumad678af1998-10-02 14:42:15 +00009830
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9832$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009833if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009835else
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009837LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841/* Override any GCC internal prototype to avoid an error.
9842 Use char because int might match the return type of a GCC
9843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844#ifdef __cplusplus
9845extern "C"
9846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009847char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009848int
9849main ()
9850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ;
9853 return 0;
9854}
9855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009856if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009858else
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861rm -f core conftest.err conftest.$ac_objext \
9862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009863LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9866$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009867if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009869
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009870 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009871 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009872 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009873else
Greg Steinadf63d62000-07-05 10:38:09 +00009874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9876$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009879else
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009881LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9910$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009913
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009914 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009915 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009916 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009917else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9920$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009921if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009923else
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009925LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929/* Override any GCC internal prototype to avoid an error.
9930 Use char because int might match the return type of a GCC
9931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932#ifdef __cplusplus
9933extern "C"
9934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009935char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009936int
9937main ()
9938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ;
9941 return 0;
9942}
9943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949rm -f core conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009951LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9954$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009955if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009957
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009958 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009959 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009960 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009961else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9964$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009965if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009969LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973/* Override any GCC internal prototype to avoid an error.
9974 Use char because int might match the return type of a GCC
9975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009976#ifdef __cplusplus
9977extern "C"
9978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009979char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009980int
9981main ()
9982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 ;
9985 return 0;
9986}
9987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009990else
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009993rm -f core conftest.err conftest.$ac_objext \
9994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009995LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9998$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009999if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010000 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010001
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010002 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010003 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010004 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010005else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010006
Martin v. Löwis130fb172001-07-19 11:00:41 +000010007 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010008fi
10009
Guido van Rossum627b2d71993-12-24 10:39:16 +000010010
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010011fi
10012
Guido van Rossum0be3e491997-05-22 20:33:33 +000010013fi
10014
Guido van Rossum49545951997-12-02 19:28:29 +000010015fi
10016
Guido van Rossumb93a8621998-05-07 13:27:32 +000010017fi
10018
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010020rm -f core conftest.err conftest.$ac_objext \
10021 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10024$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010025if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010027else
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010029LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033/* Override any GCC internal prototype to avoid an error.
10034 Use char because int might match the return type of a GCC
10035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010036#ifdef __cplusplus
10037extern "C"
10038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010039char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010040int
10041main ()
10042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 ;
10045 return 0;
10046}
10047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010050else
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053rm -f core conftest.err conftest.$ac_objext \
10054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010055LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10058$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010059if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010061
Martin v. Löwis130fb172001-07-19 11:00:41 +000010062 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010063 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010064 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010065fi
10066
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010067
Neal Norwitza978ab02002-11-02 16:58:05 +000010068 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10070$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010071if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010072 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010073else
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010075LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079/* Override any GCC internal prototype to avoid an error.
10080 Use char because int might match the return type of a GCC
10081 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082#ifdef __cplusplus
10083extern "C"
10084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010085char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010086int
10087main ()
10088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ;
10091 return 0;
10092}
10093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010099rm -f core conftest.err conftest.$ac_objext \
10100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010101LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10104$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010105if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010107
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010108 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010109 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010110 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010111fi
10112
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010113 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010114fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010115
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010116if test "$posix_threads" = "yes"; then
10117 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010118
Matthias Kloseb9621712010-04-24 17:59:49 +000010119$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010120
10121 fi
10122
10123 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10124 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010125 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010127
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010128 ;;
10129 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010131
10132 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010133 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010134$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010135
10136 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010137 esac
10138
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10140$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010141 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010143else
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010145 ac_cv_pthread_system_supported=no
10146else
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010149
10150 #include <stdio.h>
10151 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010152 void *foo(void *parm) {
10153 return NULL;
10154 }
10155 main() {
10156 pthread_attr_t attr;
10157 pthread_t id;
10158 if (pthread_attr_init(&attr)) exit(-1);
10159 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10160 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10161 exit(0);
10162 }
10163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010165 ac_cv_pthread_system_supported=yes
10166else
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010171fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173
Guido van Rossum627b2d71993-12-24 10:39:16 +000010174fi
10175
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10177$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010178 if test "$ac_cv_pthread_system_supported" = "yes"; then
10179
Matthias Kloseb9621712010-04-24 17:59:49 +000010180$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010181
10182 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 for ac_func in pthread_sigmask
10184do :
10185 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010186if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010189_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010190 case $ac_sys_system in
10191 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010194
10195 ;;
10196 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010197fi
10198done
10199
Christian Heimesf77b4b22013-08-21 13:26:05 +020010200 for ac_func in pthread_atfork
10201do :
10202 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10203if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10204 cat >>confdefs.h <<_ACEOF
10205#define HAVE_PTHREAD_ATFORK 1
10206_ACEOF
10207
10208fi
10209done
10210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010211fi
10212
10213
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010215
Matthias Kloseb9621712010-04-24 17:59:49 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10217$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224 ipv6=no
10225 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10227$as_echo "yes" >&6; }
10228 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229
10230 ipv6=yes
10231 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233else
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237 /* AF_INET6 available check */
10238#include <sys/types.h>
10239#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010240int
10241main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010243int domain = AF_INET6;
10244 ;
10245 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246}
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010248if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10251$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010253
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254else
Matthias Kloseb159a552010-04-25 21:00:44 +000010255
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010258 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010263if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10265$as_echo_n "checking if RFC2553 API is available... " >&6; }
10266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010268
10269 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010270#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010271int
10272main ()
10273{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010274struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010275 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ;
10277 return 0;
10278}
Matthias Kloseb159a552010-04-25 21:00:44 +000010279
Martin v. Löwis11437992002-04-12 09:54:03 +000010280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010282
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010284$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010285 ipv6=yes
10286
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010287else
Matthias Kloseb159a552010-04-25 21:00:44 +000010288
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010290$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010291 ipv6=no
10292
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010295fi
10296
10297if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010299
10300fi
10301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302fi
10303
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304
10305ipv6type=unknown
10306ipv6lib=none
10307ipv6trylibc=no
10308
10309if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10311$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010312 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10313 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010314 case $i in
10315 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010318
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319#include <netinet/in.h>
10320#ifdef IPV6_INRIA_VERSION
10321yes
10322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010323_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010326 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010328rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010329
10330 ;;
10331 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010334
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010335#include <netinet/in.h>
10336#ifdef __KAME__
10337yes
10338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010339_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010342 ipv6type=$i;
10343 ipv6lib=inet6
10344 ipv6libdir=/usr/local/v6/lib
10345 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010346fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010347rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010348
10349 ;;
10350 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010354#include <features.h>
10355#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10356yes
10357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010361 ipv6type=$i;
10362 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010364rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010365
10366 ;;
10367 linux-inet6)
10368 if test -d /usr/inet6; then
10369 ipv6type=$i
10370 ipv6lib=inet6
10371 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010372 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010373 fi
10374 ;;
10375 solaris)
10376 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010377 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010378 ipv6type=$i
10379 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010380 fi
10381 fi
10382 ;;
10383 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010386
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010387#include <sys/param.h>
10388#ifdef _TOSHIBA_INET6
10389yes
10390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010391_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394 ipv6type=$i;
10395 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010396 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010398rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010399
10400 ;;
10401 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010404
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405#include </usr/local/v6/include/sys/v6config.h>
10406#ifdef __V6D__
10407yes
10408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010409_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010412 ipv6type=$i;
10413 ipv6lib=v6;
10414 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010415 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010416fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010417rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010418
10419 ;;
10420 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010422/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010423
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010424#include <sys/param.h>
10425#ifdef _ZETA_MINAMI_INET6
10426yes
10427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010428_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010431 ipv6type=$i;
10432 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010433 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010434fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010435rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010436
10437 ;;
10438 esac
10439 if test "$ipv6type" != "unknown"; then
10440 break
10441 fi
10442 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10444$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010445fi
10446
10447if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10448 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10449 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10450 echo "using lib$ipv6lib"
10451 else
10452 if test $ipv6trylibc = "yes"; then
10453 echo "using libc"
10454 else
10455 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10456 echo "You need to fetch lib$ipv6lib.a from appropriate"
10457 echo 'ipv6 kit and compile beforehand.'
10458 exit 1
10459 fi
10460 fi
10461fi
10462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10464$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010466/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010467
10468 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010469int
10470main ()
10471{
10472FSIORefNum fRef = 0
10473 ;
10474 return 0;
10475}
Matthias Kloseb159a552010-04-25 21:00:44 +000010476
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010479
Matthias Kloseb159a552010-04-25 21:00:44 +000010480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10484$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010485
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010486else
Matthias Kloseb159a552010-04-25 21:00:44 +000010487
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010490
10491fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10493
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010494# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10496$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500 withval=$with_doc_strings;
10501fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010502
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010503
10504if test -z "$with_doc_strings"
10505then with_doc_strings="yes"
10506fi
10507if test "$with_doc_strings" != "no"
10508then
10509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010511
10512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10514$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010515
Antoine Pitrou042b1282010-08-13 21:15:58 +000010516# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10518$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010521if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010523if test "$withval" != no
10524then
10525
Matthias Kloseb9621712010-04-24 17:59:49 +000010526$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10529$as_echo "yes" >&6; }
10530else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10531$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010532fi
10533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536fi
10537
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010538
10539# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10541$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010544if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545 withval=$with_pymalloc;
10546fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010547
Neil Schemenauera35c6882001-02-27 04:45:05 +000010548
Neil Schemenauer16c22972002-03-22 15:34:49 +000010549if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010550then
10551 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010552fi
10553if test "$with_pymalloc" != "no"
10554then
Martin v. Löwis11437992002-04-12 09:54:03 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010557
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010558 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10561$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010562
Benjamin Peterson05159c42009-12-03 03:01:27 +000010563# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10565$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010566
10567# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010569 withval=$with_valgrind;
10570else
10571 with_valgrind=no
10572fi
10573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10575$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010576if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 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 +020010578if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010581
10582else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010583 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010584
10585fi
10586
10587
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010588 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010589fi
10590
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010591# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010592
Guido van Rossum98935bf2001-09-05 19:13:16 +000010593DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010594
Guido van Rossume97ee181999-12-20 21:27:22 +000010595# the dlopen() function means we might want to use dynload_shlib.o. some
10596# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010597for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010598do :
10599 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010600if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010602#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010604
Guido van Rossume97ee181999-12-20 21:27:22 +000010605fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010606done
Guido van Rossume97ee181999-12-20 21:27:22 +000010607
Michael W. Hudson54241132001-12-07 15:38:26 +000010608
Guido van Rossume97ee181999-12-20 21:27:22 +000010609# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10610# loading of modules.
10611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10613$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010614if test -z "$DYNLOADFILE"
10615then
10616 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010617 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10618 if test "$ac_cv_func_dlopen" = yes
10619 then DYNLOADFILE="dynload_shlib.o"
10620 else DYNLOADFILE="dynload_aix.o"
10621 fi
10622 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010623 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010624 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10625 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010626 *)
10627 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10628 # out any dynamic loading
10629 if test "$ac_cv_func_dlopen" = yes
10630 then DYNLOADFILE="dynload_shlib.o"
10631 else DYNLOADFILE="dynload_stub.o"
10632 fi
10633 ;;
10634 esac
10635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10637$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010638if test "$DYNLOADFILE" != "dynload_stub.o"
10639then
Martin v. Löwis11437992002-04-12 09:54:03 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010642
10643fi
10644
Neil Schemenauer4e425612001-06-19 15:44:15 +000010645# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10646
Michael W. Hudson54241132001-12-07 15:38:26 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10649$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010650if test -z "$MACHDEP_OBJS"
10651then
Jack Jansene578a632001-08-15 01:27:14 +000010652 MACHDEP_OBJS=$extra_machdep_objs
10653else
10654 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010655fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010656if test -z "$MACHDEP_OBJS"; then
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10658$as_echo "none" >&6; }
10659else
10660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10661$as_echo "$MACHDEP_OBJS" >&6; }
10662fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010663
Guido van Rossum627b2d71993-12-24 10:39:16 +000010664# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010665for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010666 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010667 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010668 futimens futimes gai_strerror \
10669 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010670 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010671 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010672 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10673 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010674 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010675 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010676 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010677 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010678 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010679 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010680 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10681 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010682 sigaction sigaltstack siginterrupt sigpending sigrelse \
10683 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010684 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010685 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010686 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010687do :
10688 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10689ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010690if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010693_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010694
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010695fi
10696done
10697
Michael W. Hudson54241132001-12-07 15:38:26 +000010698
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010699ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10700 #include <dirent.h>
10701"
10702if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10703
10704$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10705
10706fi
10707
10708
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010709# For some functions, having a definition is not sufficient, since
10710# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10712$as_echo_n "checking for chroot... " >&6; }
10713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010715#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010716int
10717main ()
10718{
10719void *x=chroot
10720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010727
Matthias Kloseb159a552010-04-25 21:00:44 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010729$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010733
10734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10737$as_echo_n "checking for link... " >&6; }
10738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010740#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010741int
10742main ()
10743{
10744void *x=link
10745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010752
Matthias Kloseb159a552010-04-25 21:00:44 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010754$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010758
10759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10762$as_echo_n "checking for symlink... " >&6; }
10763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010765#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010766int
10767main ()
10768{
10769void *x=symlink
10770 ;
10771 return 0;
10772}
10773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010774if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010777
Matthias Kloseb159a552010-04-25 21:00:44 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010779$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010783
10784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10787$as_echo_n "checking for fchdir... " >&6; }
10788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010790#include <unistd.h>
10791int
10792main ()
10793{
10794void *x=fchdir
10795 ;
10796 return 0;
10797}
10798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010802
Matthias Kloseb159a552010-04-25 21:00:44 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10807$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010808
10809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10812$as_echo_n "checking for fsync... " >&6; }
10813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010815#include <unistd.h>
10816int
10817main ()
10818{
10819void *x=fsync
10820 ;
10821 return 0;
10822}
10823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010824if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010827
Matthias Kloseb159a552010-04-25 21:00:44 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010833
10834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10837$as_echo_n "checking for fdatasync... " >&6; }
10838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010840#include <unistd.h>
10841int
10842main ()
10843{
10844void *x=fdatasync
10845 ;
10846 return 0;
10847}
10848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010852
Matthias Kloseb159a552010-04-25 21:00:44 +000010853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010858
10859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10862$as_echo_n "checking for epoll... " >&6; }
10863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010864/* end confdefs.h. */
10865#include <sys/epoll.h>
10866int
10867main ()
10868{
10869void *x=epoll_create
10870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010877
Matthias Kloseb159a552010-04-25 21:00:44 +000010878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010879$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10882$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010883
10884fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10887$as_echo_n "checking for epoll_create1... " >&6; }
10888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10889/* end confdefs.h. */
10890#include <sys/epoll.h>
10891int
10892main ()
10893{
10894void *x=epoll_create1
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899if ac_fn_c_try_compile "$LINENO"; then :
10900
10901$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10902
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10904$as_echo "yes" >&6; }
10905else
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908
10909fi
10910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10912$as_echo_n "checking for kqueue... " >&6; }
10913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010914/* end confdefs.h. */
10915
10916#include <sys/types.h>
10917#include <sys/event.h>
10918
10919int
10920main ()
10921{
10922int x=kqueue()
10923 ;
10924 return 0;
10925}
10926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010927if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010930
Matthias Kloseb159a552010-04-25 21:00:44 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10935$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010936
10937fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10940$as_echo_n "checking for prlimit... " >&6; }
10941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10942/* end confdefs.h. */
10943
10944#include <sys/time.h>
10945#include <sys/resource.h>
10946
10947int
10948main ()
10949{
10950void *x=prlimit
10951 ;
10952 return 0;
10953}
10954_ACEOF
10955if ac_fn_c_try_compile "$LINENO"; then :
10956
10957$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10958
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10960$as_echo "yes" >&6; }
10961else
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964
10965fi
10966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10967
Martin v. Löwisd5843682002-11-21 20:41:28 +000010968# On some systems (eg. FreeBSD 5), we would find a definition of the
10969# functions ctermid_r, setgroups in the library, but no prototype
10970# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10971# address to avoid compiler warnings and potential miscompilations
10972# because of the missing prototypes.
10973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10975$as_echo_n "checking for ctermid_r... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010977/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010978
Martin v. Löwisd5843682002-11-21 20:41:28 +000010979#include <stdio.h>
10980
Martin v. Löwisd5843682002-11-21 20:41:28 +000010981int
10982main ()
10983{
10984void* p = ctermid_r
10985 ;
10986 return 0;
10987}
10988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010992
Matthias Kloseb159a552010-04-25 21:00:44 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010995else
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10997$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010998
10999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11001
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11003$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011004if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011005 $as_echo_n "(cached) " >&6
11006else
11007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011009#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011010int
11011main ()
11012{
11013void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011014
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011019if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011020 ac_cv_flock_decl=yes
11021else
11022 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011023
11024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011026
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011027fi
11028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11029$as_echo "$ac_cv_flock_decl" >&6; }
11030if test "x${ac_cv_flock_decl}" = xyes; then
11031 for ac_func in flock
11032do :
11033 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011035 cat >>confdefs.h <<_ACEOF
11036#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011037_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011038
Antoine Pitroua3000072010-09-07 14:52:42 +000011039else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011041$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011042if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011043 $as_echo_n "(cached) " >&6
11044else
11045 ac_check_lib_save_LIBS=$LIBS
11046LIBS="-lbsd $LIBS"
11047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11048/* end confdefs.h. */
11049
11050/* Override any GCC internal prototype to avoid an error.
11051 Use char because int might match the return type of a GCC
11052 builtin and then its argument prototype would still apply. */
11053#ifdef __cplusplus
11054extern "C"
11055#endif
11056char flock ();
11057int
11058main ()
11059{
11060return flock ();
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065if ac_fn_c_try_link "$LINENO"; then :
11066 ac_cv_lib_bsd_flock=yes
11067else
11068 ac_cv_lib_bsd_flock=no
11069fi
11070rm -f core conftest.err conftest.$ac_objext \
11071 conftest$ac_exeext conftest.$ac_ext
11072LIBS=$ac_check_lib_save_LIBS
11073fi
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11075$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011076if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011077 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011078
11079
11080$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11081
11082
11083fi
11084
11085
11086fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011087done
11088
Antoine Pitroua3000072010-09-07 14:52:42 +000011089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11092$as_echo_n "checking for getpagesize... " >&6; }
11093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011095
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011096#include <unistd.h>
11097
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011098int
11099main ()
11100{
11101void* p = getpagesize
11102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011109
Matthias Kloseb159a552010-04-25 21:00:44 +000011110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011112else
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011115
11116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011118
Victor Stinner984890f2011-11-24 13:53:38 +010011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11120$as_echo_n "checking for broken unsetenv... " >&6; }
11121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11122/* end confdefs.h. */
11123
11124#include <stdlib.h>
11125
11126int
11127main ()
11128{
11129int res = unsetenv("DUMMY")
11130 ;
11131 return 0;
11132}
11133_ACEOF
11134if ac_fn_c_try_compile "$LINENO"; then :
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11136$as_echo "no" >&6; }
11137else
11138
11139$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11140
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11142$as_echo "yes" >&6; }
11143
11144fi
11145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11146
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011147for ac_prog in true
11148do
11149 # Extract the first word of "$ac_prog", so it can be a program name with args.
11150set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11152$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011153if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011155else
11156 if test -n "$TRUE"; then
11157 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11158else
11159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11160for as_dir in $PATH
11161do
11162 IFS=$as_save_IFS
11163 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011166 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 $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 +000011168 break 2
11169 fi
11170done
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011173
11174fi
11175fi
11176TRUE=$ac_cv_prog_TRUE
11177if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11179$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011180else
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011183fi
11184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011186 test -n "$TRUE" && break
11187done
11188test -n "$TRUE" || TRUE="/bin/true"
11189
11190
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11192$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011195else
11196 ac_check_lib_save_LIBS=$LIBS
11197LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201/* Override any GCC internal prototype to avoid an error.
11202 Use char because int might match the return type of a GCC
11203 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011204#ifdef __cplusplus
11205extern "C"
11206#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011207char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011208int
11209main ()
11210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011212 ;
11213 return 0;
11214}
11215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011217 ac_cv_lib_c_inet_aton=yes
11218else
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011221rm -f core conftest.err conftest.$ac_objext \
11222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011223LIBS=$ac_check_lib_save_LIBS
11224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11226$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011227if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011228 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011229else
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11231$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011232if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011234else
11235 ac_check_lib_save_LIBS=$LIBS
11236LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011238/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240/* Override any GCC internal prototype to avoid an error.
11241 Use char because int might match the return type of a GCC
11242 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011243#ifdef __cplusplus
11244extern "C"
11245#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011246char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011247int
11248main ()
11249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011256 ac_cv_lib_resolv_inet_aton=yes
11257else
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011260rm -f core conftest.err conftest.$ac_objext \
11261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011262LIBS=$ac_check_lib_save_LIBS
11263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11265$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011266if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011267 cat >>confdefs.h <<_ACEOF
11268#define HAVE_LIBRESOLV 1
11269_ACEOF
11270
11271 LIBS="-lresolv $LIBS"
11272
11273fi
11274
11275
11276fi
11277
11278
Christian Heimesd0764e22007-12-04 15:00:33 +000011279# On Tru64, chflags seems to be present, but calling it will
11280# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11282$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011283if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011285else
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011287 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011288else
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011290/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011291
Christian Heimesd0764e22007-12-04 15:00:33 +000011292#include <sys/stat.h>
11293#include <unistd.h>
11294int main(int argc, char*argv[])
11295{
11296 if(chflags(argv[0], 0) != 0)
11297 return 1;
11298 return 0;
11299}
Ned Deily3eb67d52011-06-28 00:00:28 -070011300
Christian Heimesd0764e22007-12-04 15:00:33 +000011301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011303 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011304else
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011309fi
11310
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11314$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011315if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011317if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011318 ac_cv_have_chflags="yes"
11319else
11320 ac_cv_have_chflags="no"
11321fi
11322
11323fi
11324if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011327
11328fi
11329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11331$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011332if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011336 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011337else
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011339/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011340
Christian Heimesd0764e22007-12-04 15:00:33 +000011341#include <sys/stat.h>
11342#include <unistd.h>
11343int main(int argc, char*argv[])
11344{
11345 if(lchflags(argv[0], 0) != 0)
11346 return 1;
11347 return 0;
11348}
Ned Deily3eb67d52011-06-28 00:00:28 -070011349
Christian Heimesd0764e22007-12-04 15:00:33 +000011350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011352 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011358fi
11359
11360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11363$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011364if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011366if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011367 ac_cv_have_lchflags="yes"
11368else
11369 ac_cv_have_lchflags="no"
11370fi
11371
11372fi
11373if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011376
11377fi
11378
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011379case $ac_sys_system/$ac_sys_release in
11380Darwin/*)
11381 _CUR_CFLAGS="${CFLAGS}"
11382 _CUR_LDFLAGS="${LDFLAGS}"
11383 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11384 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11385 ;;
11386esac
11387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11389$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011390if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011392else
11393 ac_check_lib_save_LIBS=$LIBS
11394LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011396/* end confdefs.h. */
11397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398/* Override any GCC internal prototype to avoid an error.
11399 Use char because int might match the return type of a GCC
11400 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011401#ifdef __cplusplus
11402extern "C"
11403#endif
11404char inflateCopy ();
11405int
11406main ()
11407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011414 ac_cv_lib_z_inflateCopy=yes
11415else
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011418rm -f core conftest.err conftest.$ac_objext \
11419 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011420LIBS=$ac_check_lib_save_LIBS
11421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11423$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011424if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011427
11428fi
11429
11430
11431case $ac_sys_system/$ac_sys_release in
11432Darwin/*)
11433 CFLAGS="${_CUR_CFLAGS}"
11434 LDFLAGS="${_CUR_LDFLAGS}"
11435 ;;
11436esac
11437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11439$as_echo_n "checking for hstrerror... " >&6; }
11440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011442
Martin v. Löwise9416172003-05-03 10:12:45 +000011443#include <netdb.h>
11444
Martin v. Löwise9416172003-05-03 10:12:45 +000011445int
11446main ()
11447{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011456
Matthias Kloseb159a552010-04-25 21:00:44 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011462
11463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011464rm -f core conftest.err conftest.$ac_objext \
11465 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11468$as_echo_n "checking for inet_aton... " >&6; }
11469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011470/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011471
Martin v. Löwis86d66262006-02-17 08:40:11 +000011472#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011473#include <sys/socket.h>
11474#include <netinet/in.h>
11475#include <arpa/inet.h>
11476
Martin v. Löwise9416172003-05-03 10:12:45 +000011477int
11478main ()
11479{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011480void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011488
Matthias Kloseb159a552010-04-25 21:00:44 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011494
11495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011496rm -f core conftest.err conftest.$ac_objext \
11497 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11500$as_echo_n "checking for inet_pton... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011503
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011504#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011505#include <sys/socket.h>
11506#include <netinet/in.h>
11507#include <arpa/inet.h>
11508
Martin v. Löwise9416172003-05-03 10:12:45 +000011509int
11510main ()
11511{
11512void* p = inet_pton
11513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011520
Matthias Kloseb159a552010-04-25 21:00:44 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011526
11527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011529
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011530# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11532$as_echo_n "checking for setgroups... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011535
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011536#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011537#ifdef HAVE_GRP_H
11538#include <grp.h>
11539#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011540
Martin v. Löwisd5843682002-11-21 20:41:28 +000011541int
11542main ()
11543{
11544void* p = setgroups
11545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011552
Matthias Kloseb159a552010-04-25 21:00:44 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011555else
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öwisd5843682002-11-21 20:41:28 +000011558
11559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011561
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011562# check for openpty and forkpty
11563
11564for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011565do :
11566 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011569#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011570_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11574$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011575if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011577else
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011579LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583/* Override any GCC internal prototype to avoid an error.
11584 Use char because int might match the return type of a GCC
11585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011586#ifdef __cplusplus
11587extern "C"
11588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011589char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011590int
11591main ()
11592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 ;
11595 return 0;
11596}
11597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011600else
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011603rm -f core conftest.err conftest.$ac_objext \
11604 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011605LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11608$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011611 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11614$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011615if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011617else
11618 ac_check_lib_save_LIBS=$LIBS
11619LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011621/* end confdefs.h. */
11622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623/* Override any GCC internal prototype to avoid an error.
11624 Use char because int might match the return type of a GCC
11625 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011626#ifdef __cplusplus
11627extern "C"
11628#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011629char openpty ();
11630int
11631main ()
11632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011634 ;
11635 return 0;
11636}
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011639 ac_cv_lib_bsd_openpty=yes
11640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011643rm -f core conftest.err conftest.$ac_objext \
11644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011645LIBS=$ac_check_lib_save_LIBS
11646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11648$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011649if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011651 LIBS="$LIBS -lbsd"
11652fi
11653
11654
11655fi
11656
Fred Drake8cef4cf2000-06-28 16:40:38 +000011657
11658fi
11659done
11660
11661for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011662do :
11663 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011668
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11671$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011672if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011674else
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680/* Override any GCC internal prototype to avoid an error.
11681 Use char because int might match the return type of a GCC
11682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011683#ifdef __cplusplus
11684extern "C"
11685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011686char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011687int
11688main ()
11689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700rm -f core conftest.err conftest.$ac_objext \
11701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011702LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11705$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011706if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011708 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11711$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011714else
11715 ac_check_lib_save_LIBS=$LIBS
11716LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011718/* end confdefs.h. */
11719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720/* Override any GCC internal prototype to avoid an error.
11721 Use char because int might match the return type of a GCC
11722 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011723#ifdef __cplusplus
11724extern "C"
11725#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011726char forkpty ();
11727int
11728main ()
11729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011731 ;
11732 return 0;
11733}
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011736 ac_cv_lib_bsd_forkpty=yes
11737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011740rm -f core conftest.err conftest.$ac_objext \
11741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011742LIBS=$ac_check_lib_save_LIBS
11743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11745$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011746if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011748 LIBS="$LIBS -lbsd"
11749fi
11750
11751
11752fi
11753
Fred Drake8cef4cf2000-06-28 16:40:38 +000011754
11755fi
11756done
11757
Jack Jansendd19cf82001-12-06 22:36:17 +000011758
Christian Heimesb186d002008-03-18 15:15:01 +000011759# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011760for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011761do :
11762 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011763if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011766_ACEOF
11767
11768fi
11769done
11770
11771
Michael W. Hudson54241132001-12-07 15:38:26 +000011772# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011773for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011774do :
11775 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11776ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011777if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011781
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011783done
11784
Michael W. Hudson54241132001-12-07 15:38:26 +000011785
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011786ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011787if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011788 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011789
Martin v. Löwis1142de32002-03-29 16:28:31 +000011790else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011792 *" dup2.$ac_objext "* ) ;;
11793 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011795esac
11796
Martin v. Löwis1142de32002-03-29 16:28:31 +000011797fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011798
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011799ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011801 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11802
11803else
11804 case " $LIBOBJS " in
11805 *" strdup.$ac_objext "* ) ;;
11806 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11807 ;;
11808esac
11809
11810fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011811
11812
11813for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011814do :
11815 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011816if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011818#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011823int
11824main ()
11825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 ;
11828 return 0;
11829}
11830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011834
Guido van Rossum627b2d71993-12-24 10:39:16 +000011835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011837
Guido van Rossum627b2d71993-12-24 10:39:16 +000011838fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011839done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011840
Jack Jansen150753c2003-03-29 22:07:47 +000011841for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011842do :
11843 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011844if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011846#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011850#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011851int
11852main ()
11853{
11854setpgrp(0,0);
11855 ;
11856 return 0;
11857}
11858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011862
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011865
11866fi
11867done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011868
Thomas Wouters3a584202000-08-05 23:28:51 +000011869for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011870do :
11871 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011872if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011873 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011877/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011878#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011879int
11880main ()
11881{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 ;
11884 return 0;
11885}
11886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_compile "$LINENO"; then :
11888
Guido van Rossum627b2d71993-12-24 10:39:16 +000011889else
Skip Montanaro6dead952003-09-25 14:50:04 +000011890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011892
Martin v. Löwis11437992002-04-12 09:54:03 +000011893
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011897fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011898done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899
Michael W. Hudson54241132001-12-07 15:38:26 +000011900
Victor Stinnere0be4232011-10-25 13:06:09 +020011901for ac_func in clock_gettime
11902do :
11903 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11904if test "x$ac_cv_func_clock_gettime" = xyes; then :
11905 cat >>confdefs.h <<_ACEOF
11906#define HAVE_CLOCK_GETTIME 1
11907_ACEOF
11908
11909else
11910
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11912$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11913if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11914 $as_echo_n "(cached) " >&6
11915else
11916 ac_check_lib_save_LIBS=$LIBS
11917LIBS="-lrt $LIBS"
11918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919/* end confdefs.h. */
11920
11921/* Override any GCC internal prototype to avoid an error.
11922 Use char because int might match the return type of a GCC
11923 builtin and then its argument prototype would still apply. */
11924#ifdef __cplusplus
11925extern "C"
11926#endif
11927char clock_gettime ();
11928int
11929main ()
11930{
11931return clock_gettime ();
11932 ;
11933 return 0;
11934}
11935_ACEOF
11936if ac_fn_c_try_link "$LINENO"; then :
11937 ac_cv_lib_rt_clock_gettime=yes
11938else
11939 ac_cv_lib_rt_clock_gettime=no
11940fi
11941rm -f core conftest.err conftest.$ac_objext \
11942 conftest$ac_exeext conftest.$ac_ext
11943LIBS=$ac_check_lib_save_LIBS
11944fi
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11946$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11947if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11948
Victor Stinner7efb8332014-08-29 15:41:08 +020011949 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011950 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11951
11952
11953$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11954
11955
11956fi
11957
11958
11959fi
11960done
11961
11962
11963for ac_func in clock_getres
11964do :
11965 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11966if test "x$ac_cv_func_clock_getres" = xyes; then :
11967 cat >>confdefs.h <<_ACEOF
11968#define HAVE_CLOCK_GETRES 1
11969_ACEOF
11970
11971else
11972
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11974$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11975if ${ac_cv_lib_rt_clock_getres+:} false; then :
11976 $as_echo_n "(cached) " >&6
11977else
11978 ac_check_lib_save_LIBS=$LIBS
11979LIBS="-lrt $LIBS"
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981/* end confdefs.h. */
11982
11983/* Override any GCC internal prototype to avoid an error.
11984 Use char because int might match the return type of a GCC
11985 builtin and then its argument prototype would still apply. */
11986#ifdef __cplusplus
11987extern "C"
11988#endif
11989char clock_getres ();
11990int
11991main ()
11992{
11993return clock_getres ();
11994 ;
11995 return 0;
11996}
11997_ACEOF
11998if ac_fn_c_try_link "$LINENO"; then :
11999 ac_cv_lib_rt_clock_getres=yes
12000else
12001 ac_cv_lib_rt_clock_getres=no
12002fi
12003rm -f core conftest.err conftest.$ac_objext \
12004 conftest$ac_exeext conftest.$ac_ext
12005LIBS=$ac_check_lib_save_LIBS
12006fi
12007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12008$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12009if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12010
12011 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12012
12013
12014fi
12015
12016
12017fi
12018done
12019
12020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12022$as_echo_n "checking for major... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012024/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012025
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012026#if defined(MAJOR_IN_MKDEV)
12027#include <sys/mkdev.h>
12028#elif defined(MAJOR_IN_SYSMACROS)
12029#include <sys/sysmacros.h>
12030#else
12031#include <sys/types.h>
12032#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012033
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012034int
12035main ()
12036{
12037
12038 makedev(major(0),minor(0));
12039
12040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012045
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12050$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012051
12052else
Skip Montanaro6dead952003-09-25 14:50:04 +000012053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012056
12057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core conftest.err conftest.$ac_objext \
12059 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012060
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012061# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012062# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12064$as_echo_n "checking for getaddrinfo... " >&6; }
12065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012067
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012068#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012069#include <sys/socket.h>
12070#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012071#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072
Martin v. Löwis11437992002-04-12 09:54:03 +000012073int
12074main ()
12075{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012076getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 ;
12078 return 0;
12079}
12080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012081if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012082 have_getaddrinfo=yes
12083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086rm -f core conftest.err conftest.$ac_objext \
12087 conftest$ac_exeext conftest.$ac_ext
12088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12089$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012090if test $have_getaddrinfo = yes
12091then
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12093$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012098
12099if test "${enable_ipv6+set}" = set; then
12100 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12101else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012102 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012103fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012106/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107
Stefan Krah19c21392012-11-22 23:47:32 +010012108#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109#include <sys/types.h>
12110#include <netdb.h>
12111#include <string.h>
12112#include <sys/socket.h>
12113#include <netinet/in.h>
12114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012115int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116{
12117 int passive, gaierr, inet4 = 0, inet6 = 0;
12118 struct addrinfo hints, *ai, *aitop;
12119 char straddr[INET6_ADDRSTRLEN], strport[16];
12120
12121 for (passive = 0; passive <= 1; passive++) {
12122 memset(&hints, 0, sizeof(hints));
12123 hints.ai_family = AF_UNSPEC;
12124 hints.ai_flags = passive ? AI_PASSIVE : 0;
12125 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012126 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012127 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12128 (void)gai_strerror(gaierr);
12129 goto bad;
12130 }
12131 for (ai = aitop; ai; ai = ai->ai_next) {
12132 if (ai->ai_addr == NULL ||
12133 ai->ai_addrlen == 0 ||
12134 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12135 straddr, sizeof(straddr), strport, sizeof(strport),
12136 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12137 goto bad;
12138 }
12139 switch (ai->ai_family) {
12140 case AF_INET:
12141 if (strcmp(strport, "54321") != 0) {
12142 goto bad;
12143 }
12144 if (passive) {
12145 if (strcmp(straddr, "0.0.0.0") != 0) {
12146 goto bad;
12147 }
12148 } else {
12149 if (strcmp(straddr, "127.0.0.1") != 0) {
12150 goto bad;
12151 }
12152 }
12153 inet4++;
12154 break;
12155 case AF_INET6:
12156 if (strcmp(strport, "54321") != 0) {
12157 goto bad;
12158 }
12159 if (passive) {
12160 if (strcmp(straddr, "::") != 0) {
12161 goto bad;
12162 }
12163 } else {
12164 if (strcmp(straddr, "::1") != 0) {
12165 goto bad;
12166 }
12167 }
12168 inet6++;
12169 break;
12170 case AF_UNSPEC:
12171 goto bad;
12172 break;
12173 default:
12174 /* another family support? */
12175 break;
12176 }
12177 }
12178 }
12179
12180 if (!(inet4 == 0 || inet4 == 2))
12181 goto bad;
12182 if (!(inet6 == 0 || inet6 == 2))
12183 goto bad;
12184
12185 if (aitop)
12186 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012187 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012188
12189 bad:
12190 if (aitop)
12191 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012193}
12194
Martin v. Löwis11437992002-04-12 09:54:03 +000012195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012197 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012205fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012206
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12210$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12211
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012212if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012213then
12214 if test $ipv6 = yes
12215 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012216 echo 'Fatal: You must get working getaddrinfo() function.'
12217 echo ' or you can specify "--disable-ipv6"'.
12218 exit 1
12219 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012220else
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012223
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012224fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012225
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012226for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012227do :
12228 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012232_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012233
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012234fi
12235done
12236
Michael W. Hudson54241132001-12-07 15:38:26 +000012237
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012238# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12240$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012246#include <sys/types.h>
12247#include <sys/time.h>
12248#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250int
12251main ()
12252{
12253if ((struct tm *) 0)
12254return 0;
12255 ;
12256 return 0;
12257}
12258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012261else
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12267$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012268if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271
12272fi
12273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12275$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012276if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281#include <sys/types.h>
12282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284int
12285main ()
12286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287struct tm tm;
12288 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 ;
12291 return 0;
12292}
12293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295 ac_cv_struct_tm=time.h
12296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12302$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012303if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306
12307fi
12308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309ac_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 +000012310#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312"
Victor Stinnere0be4232011-10-25 13:06:09 +020012313if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012314
12315cat >>confdefs.h <<_ACEOF
12316#define HAVE_STRUCT_TM_TM_ZONE 1
12317_ACEOF
12318
12319
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325
12326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12328"
Victor Stinnere0be4232011-10-25 13:06:09 +020012329if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333fi
12334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337_ACEOF
12338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12340$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012345/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347#if !HAVE_DECL_TZNAME
12348extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351int
12352main ()
12353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360 ac_cv_var_tzname=yes
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012364rm -f core conftest.err conftest.$ac_objext \
12365 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12368$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012369 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373 fi
12374fi
12375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376ac_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 +020012377if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
12379cat >>confdefs.h <<_ACEOF
12380#define HAVE_STRUCT_STAT_ST_RDEV 1
12381_ACEOF
12382
12383
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012384fi
12385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386ac_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 +020012387if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012388
Martin v. Löwis11437992002-04-12 09:54:03 +000012389cat >>confdefs.h <<_ACEOF
12390#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12391_ACEOF
12392
12393
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012394fi
12395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396ac_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 +020012397if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012398
12399cat >>confdefs.h <<_ACEOF
12400#define HAVE_STRUCT_STAT_ST_FLAGS 1
12401_ACEOF
12402
12403
12404fi
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406ac_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 +020012407if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012408
12409cat >>confdefs.h <<_ACEOF
12410#define HAVE_STRUCT_STAT_ST_GEN 1
12411_ACEOF
12412
12413
12414fi
12415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416ac_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 +020012417if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012418
12419cat >>confdefs.h <<_ACEOF
12420#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12421_ACEOF
12422
12423
12424fi
12425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426ac_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 +020012427if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012428
Martin v. Löwis11437992002-04-12 09:54:03 +000012429cat >>confdefs.h <<_ACEOF
12430#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12431_ACEOF
12432
12433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012435
12436else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012438 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12440 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012441esac
12442
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012443fi
12444
Michael W. Hudson54241132001-12-07 15:38:26 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Matthias Kloseb9621712010-04-24 17:59:49 +000012447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12448$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451else
Matthias Kloseb159a552010-04-25 21:00:44 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012454/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012455#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012456int
12457main ()
12458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012459return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 ;
12461 return 0;
12462}
12463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465 ac_cv_header_time_altzone=yes
12466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471fi
12472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12474$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478
12479fi
12480
Guido van Rossumda88dad1995-01-26 00:46:29 +000012481was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12483$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012486
12487#include <sys/types.h>
12488#include <sys/select.h>
12489#include <sys/time.h>
12490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012504 was_it_defined=yes
12505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12509$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510
Matthias Kloseb9621712010-04-24 17:59:49 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12512$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012513if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012517/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012518#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012522struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 ;
12524 return 0;
12525}
12526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528 ac_cv_struct_addrinfo=yes
12529else
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12533fi
12534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12536$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012537if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012540
12541fi
12542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12544$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012545if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550
12551# include <sys/types.h>
12552# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012553int
12554main ()
12555{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012562 ac_cv_struct_sockaddr_storage=yes
12563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12567fi
12568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12570$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012571if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012574
12575fi
12576
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12580$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012581if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012586$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012587int
12588main ()
12589{
12590static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012591test_array [0] = 0;
12592return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
12594 ;
12595 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012596}
Martin v. Löwis11437992002-04-12 09:54:03 +000012597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012599 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12606$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609
12610fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012611
Matthias Kloseb9621712010-04-24 17:59:49 +000012612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12613$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012614if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012616else
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012623
Martin v. Löwis11437992002-04-12 09:54:03 +000012624#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012625 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012627 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629 char const *const *pcpcc;
12630 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 /* NEC SVR4.0.2 mips cc rejects this. */
12632 struct point {int x, y;};
12633 static struct point const zero = {0,0};
12634 /* AIX XL C 1.02.0.0 rejects this.
12635 It does not let you subtract one const X* pointer from another in
12636 an arm of an if-expression whose if-part is not a constant
12637 expression */
12638 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 ++pcpcc;
12642 ppc = (char**) pcpcc;
12643 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012644 { /* SCO 3.2v4 cc rejects this sort of thing. */
12645 char tx;
12646 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 }
12652 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12653 int x[] = {25, 17};
12654 const int *foo = &x[0];
12655 ++foo;
12656 }
12657 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12658 typedef const int *iptr;
12659 iptr p = 0;
12660 ++p;
12661 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012662 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012664 struct s { int j; const int *ap[3]; } bx;
12665 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 }
12667 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12668 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012672#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012673
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ;
12675 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676}
Martin v. Löwis11437992002-04-12 09:54:03 +000012677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679 ac_cv_c_const=yes
12680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12686$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690
12691fi
12692
Michael W. Hudson54241132001-12-07 15:38:26 +000012693
Guido van Rossumda88dad1995-01-26 00:46:29 +000012694works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12696$as_echo_n "checking for working volatile... " >&6; }
12697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012698/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012699
Martin v. Löwis11437992002-04-12 09:54:03 +000012700int
12701main ()
12702{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ;
12705 return 0;
12706}
12707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012708if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012709 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012710else
Skip Montanaro6dead952003-09-25 14:50:04 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012714
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12718$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012719
Guido van Rossumda88dad1995-01-26 00:46:29 +000012720works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12722$as_echo_n "checking for working signed char... " >&6; }
12723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012725
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012735 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012736else
Skip Montanaro6dead952003-09-25 14:50:04 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012739
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012740
Guido van Rossum7f43da71994-08-01 12:15:30 +000012741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12744$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012745
Guido van Rossumda88dad1995-01-26 00:46:29 +000012746have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12748$as_echo_n "checking for prototypes... " >&6; }
12749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012751int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012752int
12753main ()
12754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ;
12757 return 0;
12758}
12759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
Matthias Kloseb159a552010-04-25 21:00:44 +000012764 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12768$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769
Guido van Rossumda88dad1995-01-26 00:46:29 +000012770works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12772$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012775
12776#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012777int foo(int x, ...) {
12778 va_list va;
12779 va_start(va, x);
12780 va_arg(va, int);
12781 va_arg(va, char *);
12782 va_arg(va, double);
12783 return 0;
12784}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012785
Martin v. Löwis11437992002-04-12 09:54:03 +000012786int
12787main ()
12788{
Guido van Rossum90eea071996-08-30 20:58:57 +000012789return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 ;
12791 return 0;
12792}
12793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012799 works=yes
12800
Guido van Rossum627b2d71993-12-24 10:39:16 +000012801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12804$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805
Martin v. Löwisd6320502004-08-12 13:45:08 +000012806# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12808$as_echo_n "checking for socketpair... " >&6; }
12809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012810/* end confdefs.h. */
12811
12812#include <sys/types.h>
12813#include <sys/socket.h>
12814
12815int
12816main ()
12817{
12818void *x=socketpair
12819 ;
12820 return 0;
12821}
12822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012826
Matthias Kloseb159a552010-04-25 21:00:44 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012832
12833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012835
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012836# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12838$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841#include <sys/types.h>
12842#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012843int
12844main ()
12845{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846struct sockaddr x;
12847x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ;
12849 return 0;
12850}
12851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012852if ac_fn_c_try_compile "$LINENO"; then :
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12854$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857
12858else
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12860$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012861
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012864
Guido van Rossumda88dad1995-01-26 00:46:29 +000012865va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12867$as_echo_n "checking whether va_list is an array... " >&6; }
12868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870
12871#ifdef HAVE_STDARG_PROTOTYPES
12872#include <stdarg.h>
12873#else
12874#include <varargs.h>
12875#endif
12876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877int
12878main ()
12879{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ;
12882 return 0;
12883}
12884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012885if ac_fn_c_try_compile "$LINENO"; then :
12886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887else
Skip Montanaro6dead952003-09-25 14:50:04 +000012888
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Guido van Rossumda88dad1995-01-26 00:46:29 +000012892 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12897$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012899# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012903if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12908$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012909 OLD_CFLAGS=$CFLAGS
12910 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012913
12914# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012915
Martin v. Löwis11437992002-04-12 09:54:03 +000012916int
12917main ()
12918{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012919
12920 char *name;
12921 struct hostent *he, *res;
12922 char buffer[2048];
12923 int buflen = 2048;
12924 int h_errnop;
12925
12926 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
12928 ;
12929 return 0;
12930}
12931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12940$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012942else
Skip Montanaro6dead952003-09-25 14:50:04 +000012943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945$as_echo "no" >&6; }
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12947$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012949/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012951# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953int
12954main ()
12955{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012956
12957 char *name;
12958 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012959 char buffer[2048];
12960 int buflen = 2048;
12961 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012962
Matthias Kloseb159a552010-04-25 21:00:44 +000012963 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
12965 ;
12966 return 0;
12967}
12968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012972
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Matthias Kloseb159a552010-04-25 21:00:44 +000012974$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12977$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012979else
Skip Montanaro6dead952003-09-25 14:50:04 +000012980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12984$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12986/* end confdefs.h. */
12987
12988# include <netdb.h>
12989
12990int
12991main ()
12992{
12993
12994 char *name;
12995 struct hostent *he;
12996 struct hostent_data data;
12997
12998 (void) gethostbyname_r(name, he, &data);
12999
13000 ;
13001 return 0;
13002}
13003_ACEOF
13004if ac_fn_c_try_compile "$LINENO"; then :
13005
13006 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13007
13008
13009$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13010
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13012$as_echo "yes" >&6; }
13013
13014else
13015
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13017$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013027 CFLAGS=$OLD_CFLAGS
13028
13029else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 for ac_func in gethostbyname
13032do :
13033 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013034if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013037_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013038
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013039fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013040done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013041
Michael W. Hudson54241132001-12-07 15:38:26 +000013042
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013043fi
13044
Michael W. Hudson54241132001-12-07 15:38:26 +000013045
13046
13047
13048
13049
13050
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051# checks for system services
13052# (none yet)
13053
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013054# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013055ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013056if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013057
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13060$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013065LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069/* Override any GCC internal prototype to avoid an error.
13070 Use char because int might match the return type of a GCC
13071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013072#ifdef __cplusplus
13073extern "C"
13074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013075char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013091LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13094$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013095if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 cat >>confdefs.h <<_ACEOF
13097#define HAVE_LIBIEEE 1
13098_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013100 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101
Guido van Rossum627b2d71993-12-24 10:39:16 +000013102fi
13103
Michael W. Hudson54241132001-12-07 15:38:26 +000013104
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013105fi
13106
Michael W. Hudson54241132001-12-07 15:38:26 +000013107
Guido van Rossum7f253911997-05-09 02:42:48 +000013108# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13110$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013113if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013115if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013116then
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13121$as_echo "yes" >&6; }
13122else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13123$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013124fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13127$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128fi
13129
Guido van Rossum7f253911997-05-09 02:42:48 +000013130
Guido van Rossum7f43da71994-08-01 12:15:30 +000013131# check for --with-libm=...
13132
Guido van Rossum563e7081996-09-10 18:20:48 +000013133case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013134Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013135*) LIBM=-lm
13136esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13138$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013143if test "$withval" = no
13144then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13146$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013147elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013148then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13150$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013151else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013152fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013153else
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13155$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156fi
13157
Guido van Rossum7f43da71994-08-01 12:15:30 +000013158
13159# check for --with-libc=...
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13162$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013164# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013167if test "$withval" = no
13168then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13170$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013171elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013172then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13174$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013175else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013176fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13179$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180fi
13181
Guido van Rossum7f43da71994-08-01 12:15:30 +000013182
Stefan Krah1919b7e2012-03-21 18:25:23 +010013183# **************************************
13184# * Check for gcc x64 inline assembler *
13185# **************************************
13186
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13188$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190/* end confdefs.h. */
13191
13192int
13193main ()
13194{
13195
13196 __asm__ __volatile__ ("movq %rcx, %rax");
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
13202if ac_fn_c_try_compile "$LINENO"; then :
13203 have_gcc_asm_for_x64=yes
13204else
13205 have_gcc_asm_for_x64=no
13206fi
13207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13209$as_echo "$have_gcc_asm_for_x64" >&6; }
13210if test "$have_gcc_asm_for_x64" = yes
13211then
13212
13213$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13214
13215fi
13216
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013217# **************************************************
13218# * Check for various properties of floating point *
13219# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13222$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013223if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013225else
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013228 ac_cv_little_endian_double=no
13229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013231/* end confdefs.h. */
13232
13233#include <string.h>
13234int main() {
13235 double x = 9006104071832581.0;
13236 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13237 return 0;
13238 else
13239 return 1;
13240}
13241
13242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244 ac_cv_little_endian_double=yes
13245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013250fi
13251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013252fi
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13255$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013256if test "$ac_cv_little_endian_double" = yes
13257then
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013260
13261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13264$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013265if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013267else
13268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013270 ac_cv_big_endian_double=no
13271else
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013273/* end confdefs.h. */
13274
13275#include <string.h>
13276int main() {
13277 double x = 9006104071832581.0;
13278 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13279 return 0;
13280 else
13281 return 1;
13282}
13283
13284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013286 ac_cv_big_endian_double=yes
13287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292fi
13293
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13297$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013298if test "$ac_cv_big_endian_double" = yes
13299then
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013302
13303fi
13304
13305# Some ARM platforms use a mixed-endian representation for doubles.
13306# While Python doesn't currently have full support for these platforms
13307# (see e.g., issue 1762561), we can at least make sure that float <-> string
13308# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13310$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013311if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013313else
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013316 ac_cv_mixed_endian_double=no
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013319/* end confdefs.h. */
13320
13321#include <string.h>
13322int main() {
13323 double x = 9006104071832581.0;
13324 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13325 return 0;
13326 else
13327 return 1;
13328}
13329
13330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013331if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013332 ac_cv_mixed_endian_double=yes
13333else
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013338fi
13339
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13343$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013344if test "$ac_cv_mixed_endian_double" = yes
13345then
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013348
13349fi
13350
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013351# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013352# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013353# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013354# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013355# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013356# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013357
13358# This inline assembler syntax may also work for suncc and icc,
13359# so we try it on all platforms.
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13362$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013364/* end confdefs.h. */
13365
13366int
13367main ()
13368{
13369
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013370 unsigned short cw;
13371 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13372 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013373
13374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013379 have_gcc_asm_for_x87=yes
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013382fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13385$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013386if test "$have_gcc_asm_for_x87" = yes
13387then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013390
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13394$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13396/* end confdefs.h. */
13397
13398int
13399main ()
13400{
13401
13402 unsigned int fpcr;
13403 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13404 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13405
13406 ;
13407 return 0;
13408}
13409_ACEOF
13410if ac_fn_c_try_compile "$LINENO"; then :
13411 have_gcc_asm_for_mc68881=yes
13412else
13413 have_gcc_asm_for_mc68881=no
13414fi
13415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13417$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13418if test "$have_gcc_asm_for_mc68881" = yes
13419then
13420
13421$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13422
13423fi
13424
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013425# Detect whether system arithmetic is subject to x87-style double
13426# rounding issues. The result of this test has little meaning on non
13427# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13428# mode is round-to-nearest and double rounding issues are present, and
13429# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13431$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013432# $BASECFLAGS may affect the result
13433ac_save_cc="$CC"
13434CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013435if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013436 ac_cv_x87_double_rounding=no
13437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013439/* end confdefs.h. */
13440
13441#include <stdlib.h>
13442#include <math.h>
13443int main() {
13444 volatile double x, y, z;
13445 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13446 x = 0.99999999999999989; /* 1-2**-53 */
13447 y = 1./x;
13448 if (y != 1.)
13449 exit(0);
13450 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13451 x = 1e16;
13452 y = 2.99999;
13453 z = x + y;
13454 if (z != 1e16+4.)
13455 exit(0);
13456 /* both tests show evidence of double rounding */
13457 exit(1);
13458}
13459
13460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013462 ac_cv_x87_double_rounding=no
13463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013468fi
13469
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013470CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13472$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013473if test "$ac_cv_x87_double_rounding" = yes
13474then
13475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013477
13478fi
13479
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013480# ************************************
13481# * Check for mathematical functions *
13482# ************************************
13483
13484LIBS_SAVE=$LIBS
13485LIBS="$LIBS $LIBM"
13486
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013487for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13488do :
13489 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13490ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013491if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013492 cat >>confdefs.h <<_ACEOF
13493#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13494_ACEOF
13495
13496fi
13497done
13498
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013499for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013500do :
13501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13502ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013503if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013504 cat >>confdefs.h <<_ACEOF
13505#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13506_ACEOF
13507
13508fi
13509done
13510
13511ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13512"
Victor Stinnere0be4232011-10-25 13:06:09 +020013513if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013514 ac_have_decl=1
13515else
13516 ac_have_decl=0
13517fi
13518
13519cat >>confdefs.h <<_ACEOF
13520#define HAVE_DECL_ISINF $ac_have_decl
13521_ACEOF
13522ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13523"
Victor Stinnere0be4232011-10-25 13:06:09 +020013524if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013525 ac_have_decl=1
13526else
13527 ac_have_decl=0
13528fi
13529
13530cat >>confdefs.h <<_ACEOF
13531#define HAVE_DECL_ISNAN $ac_have_decl
13532_ACEOF
13533ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13534"
Victor Stinnere0be4232011-10-25 13:06:09 +020013535if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013536 ac_have_decl=1
13537else
13538 ac_have_decl=0
13539fi
13540
13541cat >>confdefs.h <<_ACEOF
13542#define HAVE_DECL_ISFINITE $ac_have_decl
13543_ACEOF
13544
13545
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013546# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13547# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13549$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013550if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013552else
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013555 ac_cv_tanh_preserves_zero_sign=no
13556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013558/* end confdefs.h. */
13559
13560#include <math.h>
13561#include <stdlib.h>
13562int main() {
13563 /* return 0 if either negative zeros don't exist
13564 on this platform or if negative zeros exist
13565 and tanh(-0.) == -0. */
13566 if (atan2(0., -1.) == atan2(-0., -1.) ||
13567 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13568 else exit(1);
13569}
13570
13571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013572if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013573 ac_cv_tanh_preserves_zero_sign=yes
13574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013579fi
13580
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013581fi
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13584$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013585if test "$ac_cv_tanh_preserves_zero_sign" = yes
13586then
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013589
13590fi
13591
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013592if test "$ac_cv_func_log1p" = yes
13593then
13594 # On some versions of AIX, log1p(-0.) returns 0. instead of
13595 # -0. See issue #9920.
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13597$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013598 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013599 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013600else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013601
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013602 if test "$cross_compiling" = yes; then :
13603 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013604else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13606/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013607
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013608 #include <math.h>
13609 #include <stdlib.h>
13610 int main() {
13611 /* Fail if the signs of log1p(-0.) and -0. can be
13612 distinguished. */
13613 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13614 return 0;
13615 else
13616 return 1;
13617 }
13618
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013619_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013620if ac_fn_c_try_run "$LINENO"; then :
13621 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013622else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013623 ac_cv_log1p_drops_zero_sign=yes
13624fi
13625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013627fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013628
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013629fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013630
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13632$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13633fi
13634if test "$ac_cv_log1p_drops_zero_sign" = yes
13635then
13636
13637$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13638
13639fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013640
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013641LIBS=$LIBS_SAVE
13642
Mark Dickinsona614f042009-11-28 12:48:43 +000013643# For multiprocessing module, check that sem_open
13644# actually works. For FreeBSD versions <= 7.2,
13645# the kernel module that provides POSIX semaphores
13646# isn't loaded by default, so an attempt to call
13647# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13649$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013654 ac_cv_posix_semaphores_enabled=yes
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013657/* end confdefs.h. */
13658
13659#include <unistd.h>
13660#include <fcntl.h>
13661#include <stdio.h>
13662#include <semaphore.h>
13663#include <sys/stat.h>
13664
13665int main(void) {
13666 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13667 if (a == SEM_FAILED) {
13668 perror("sem_open");
13669 return 1;
13670 }
13671 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013672 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013673 return 0;
13674}
13675
13676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013678 ac_cv_posix_semaphores_enabled=yes
13679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013684fi
13685
13686
Mark Dickinsona614f042009-11-28 12:48:43 +000013687fi
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13690$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013691if test $ac_cv_posix_semaphores_enabled = no
13692then
13693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013695
13696fi
13697
Mark Dickinson10683072009-04-18 21:18:19 +000013698# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13700$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013701if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013705 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013708/* end confdefs.h. */
13709
13710#include <unistd.h>
13711#include <fcntl.h>
13712#include <stdio.h>
13713#include <semaphore.h>
13714#include <sys/stat.h>
13715
13716int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013717 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013718 int count;
13719 int res;
13720 if(a==SEM_FAILED){
13721 perror("sem_open");
13722 return 1;
13723
13724 }
13725 res = sem_getvalue(a, &count);
13726 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013727 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013728 return res==-1 ? 1 : 0;
13729}
13730
Mark Dickinson10683072009-04-18 21:18:19 +000013731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013733 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013739fi
13740
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013742fi
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13745$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746if test $ac_cv_broken_sem_getvalue = yes
13747then
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013750
13751fi
13752
Mark Dickinsonbd792642009-03-18 20:06:12 +000013753# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13755$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013756# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013757if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013758 enableval=$enable_big_digits; case $enable_big_digits in
13759yes)
13760 enable_big_digits=30 ;;
13761no)
13762 enable_big_digits=15 ;;
1376315|30)
13764 ;;
13765*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013766 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 +000013767esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13769$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013770
13771cat >>confdefs.h <<_ACEOF
13772#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13773_ACEOF
13774
13775
13776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13778$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013779fi
13780
13781
Guido van Rossumef2255b2000-03-10 22:30:29 +000013782# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013783ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013784if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013789 wchar_h="yes"
13790
Guido van Rossumef2255b2000-03-10 22:30:29 +000013791else
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013793
13794fi
13795
Michael W. Hudson54241132001-12-07 15:38:26 +000013796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013798# determine wchar_t size
13799if test "$wchar_h" = yes
13800then
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13804# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13806$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13811"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813else
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 if test "$ac_cv_type_wchar_t" = yes; then
13815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013817as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013818See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 else
13820 ac_cv_sizeof_wchar_t=0
13821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13826$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827
13828
13829
Martin v. Löwis11437992002-04-12 09:54:03 +000013830cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013831#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013832_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013833
Michael W. Hudson54241132001-12-07 15:38:26 +000013834
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013835fi
13836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13838$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013839have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013842
13843#include <tcl.h>
13844#if TCL_UTF_MAX != 6
13845# error "NOT UCS4_TCL"
13846#endif
13847int
13848main ()
13849{
13850
13851 ;
13852 return 0;
13853}
13854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013856
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013859
13860 have_ucs4_tcl=yes
13861
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13865$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013866
Skip Montanaro6dead952003-09-25 14:50:04 +000013867# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013868if test "$wchar_h" = yes
13869then
13870 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13872$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013873 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013875else
13876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013878 ac_cv_wchar_t_signed=yes
13879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013881/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013882
13883 #include <wchar.h>
13884 int main()
13885 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013886 /* Success: exit code 0 */
13887 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013888 }
13889
13890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013891if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013892 ac_cv_wchar_t_signed=yes
13893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013898fi
13899
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013900fi
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13903$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904fi
13905
Georg Brandl52d168a2008-01-07 18:10:24 +000013906# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013907if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013908 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013909then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013910 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
Georg Brandl52d168a2008-01-07 18:10:24 +000013914else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013915 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013916fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13918$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013919
13920# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13922$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013923if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 ac_cv_c_bigendian=unknown
13927 # See if we're dealing with a universal compiler.
13928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13929/* end confdefs.h. */
13930#ifndef __APPLE_CC__
13931 not a universal capable compiler
13932 #endif
13933 typedef int dummy;
13934
Skip Montanaro6dead952003-09-25 14:50:04 +000013935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013936if ac_fn_c_try_compile "$LINENO"; then :
13937
13938 # Check for potential -arch flags. It is not universal unless
13939 # there are at least two -arch flags with different values.
13940 ac_arch=
13941 ac_prev=
13942 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13943 if test -n "$ac_prev"; then
13944 case $ac_word in
13945 i?86 | x86_64 | ppc | ppc64)
13946 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13947 ac_arch=$ac_word
13948 else
13949 ac_cv_c_bigendian=universal
13950 break
13951 fi
13952 ;;
13953 esac
13954 ac_prev=
13955 elif test "x$ac_word" = "x-arch"; then
13956 ac_prev=arch
13957 fi
13958 done
13959fi
13960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13961 if test $ac_cv_c_bigendian = unknown; then
13962 # See if sys/param.h defines the BYTE_ORDER macro.
13963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013965#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968int
13969main ()
13970{
Matthias Kloseb9621712010-04-24 17:59:49 +000013971#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13972 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13973 && LITTLE_ENDIAN)
13974 bogus endian macros
13975 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
13977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013982 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013984/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013985#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988int
13989main ()
13990{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013991#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 not big endian
13993 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
13995 ;
13996 return 0;
13997}
13998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013999if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014000 ac_cv_c_bigendian=yes
14001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014005fi
14006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14007 fi
14008 if test $ac_cv_c_bigendian = unknown; then
14009 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014012#include <limits.h>
14013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014int
14015main ()
14016{
Matthias Kloseb9621712010-04-24 17:59:49 +000014017#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14018 bogus endian macros
14019 #endif
14020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ;
14022 return 0;
14023}
14024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if ac_fn_c_try_compile "$LINENO"; then :
14026 # It does; now see whether it defined to _BIG_ENDIAN or not.
14027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14028/* end confdefs.h. */
14029#include <limits.h>
14030
14031int
14032main ()
14033{
14034#ifndef _BIG_ENDIAN
14035 not big endian
14036 #endif
14037
14038 ;
14039 return 0;
14040}
14041_ACEOF
14042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014044else
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14048fi
14049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14050 fi
14051 if test $ac_cv_c_bigendian = unknown; then
14052 # Compile a test program.
14053 if test "$cross_compiling" = yes; then :
14054 # Try to guess by grepping values from an object file.
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056/* end confdefs.h. */
14057short int ascii_mm[] =
14058 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14059 short int ascii_ii[] =
14060 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14061 int use_ascii (int i) {
14062 return ascii_mm[i] + ascii_ii[i];
14063 }
14064 short int ebcdic_ii[] =
14065 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14066 short int ebcdic_mm[] =
14067 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14068 int use_ebcdic (int i) {
14069 return ebcdic_mm[i] + ebcdic_ii[i];
14070 }
14071 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073int
14074main ()
14075{
14076return use_ascii (foo) == use_ebcdic (foo);
14077 ;
14078 return 0;
14079}
14080_ACEOF
14081if ac_fn_c_try_compile "$LINENO"; then :
14082 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14083 ac_cv_c_bigendian=yes
14084 fi
14085 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14086 if test "$ac_cv_c_bigendian" = unknown; then
14087 ac_cv_c_bigendian=no
14088 else
14089 # finding both strings is unlikely to happen, but who knows?
14090 ac_cv_c_bigendian=unknown
14091 fi
14092 fi
14093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014097/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014099int
14100main ()
14101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 /* Are we little or big endian? From Harbison&Steele. */
14104 union
14105 {
14106 long int l;
14107 char c[sizeof (long int)];
14108 } u;
14109 u.l = 1;
14110 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111
14112 ;
14113 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014114}
Martin v. Löwis11437992002-04-12 09:54:03 +000014115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014117 ac_cv_c_bigendian=no
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14128$as_echo "$ac_cv_c_bigendian" >&6; }
14129 case $ac_cv_c_bigendian in #(
14130 yes)
14131 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14132;; #(
14133 no)
14134 ;; #(
14135 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 ;; #(
14140 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014141 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014142 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014144
Michael W. Hudson54241132001-12-07 15:38:26 +000014145
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014146# ABI version string for Python extension modules. This appears between the
14147# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14148# from the following attributes which affect the ABI of this Python build (in
14149# this order):
14150#
14151# * The Python implementation (always 'cpython-' for us)
14152# * The major and minor version numbers
14153# * --with-pydebug (adds a 'd')
14154# * --with-pymalloc (adds a 'm')
14155# * --with-wide-unicode (adds a 'u')
14156#
14157# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014158# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14159# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014160
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14162$as_echo_n "checking ABIFLAGS... " >&6; }
14163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14164$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14166$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014167SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14169$as_echo "$SOABI" >&6; }
14170
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014171
14172case $ac_sys_system in
14173 Linux*|GNU*)
14174 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14175 *)
14176 EXT_SUFFIX=${SHLIB_SUFFIX};;
14177esac
14178
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14180$as_echo_n "checking LDVERSION... " >&6; }
14181LDVERSION='$(VERSION)$(ABIFLAGS)'
14182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14183$as_echo "$LDVERSION" >&6; }
14184
doko@python.org87421192013-01-26 11:39:31 +010014185
14186LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14187
14188
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014189# Check whether right shifting a negative integer extends the sign bit
14190# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14192$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014193if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014198 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014201/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014202
14203int main()
14204{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014205 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014206}
14207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014210 ac_cv_rshift_extends_sign=yes
14211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014216fi
14217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218fi
14219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14221$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014222if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014223then
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014226
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014227fi
14228
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014229# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14231$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014232if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014234else
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014238#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014239int
14240main ()
14241{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014242
14243 FILE *f = fopen("/dev/null", "r");
14244 flockfile(f);
14245 getc_unlocked(f);
14246 funlockfile(f);
14247
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ;
14249 return 0;
14250}
14251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014252if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014253 ac_cv_have_getc_unlocked=yes
14254else
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 ac_cv_have_getc_unlocked=no
14256fi
14257rm -f core conftest.err conftest.$ac_objext \
14258 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14262$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014263if test "$ac_cv_have_getc_unlocked" = yes
14264then
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014267
14268fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014269
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014270# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014271# save the value of LIBS so we don't actually link Python with readline
14272LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014273
Gregory P. Smith18820942008-09-07 06:24:49 +000014274# On some systems we need to link readline to a termcap compatible
14275# library. NOTE: Keep the precedence of listed libraries synchronised
14276# with setup.py.
14277py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14279$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014280for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014281 if test -z "$py_libtermcap"; then
14282 READLINE_LIBS="-lreadline"
14283 else
14284 READLINE_LIBS="-lreadline -l$py_libtermcap"
14285 fi
14286 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014288/* end confdefs.h. */
14289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290/* Override any GCC internal prototype to avoid an error.
14291 Use char because int might match the return type of a GCC
14292 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014293#ifdef __cplusplus
14294extern "C"
14295#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014296char readline ();
14297int
14298main ()
14299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014301 ;
14302 return 0;
14303}
14304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014306 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core conftest.err conftest.$ac_objext \
14309 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014310 if test $py_cv_lib_readline = yes; then
14311 break
14312 fi
14313done
14314# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14315#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014316if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14318$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014319else
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14321$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014324
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014325fi
14326
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014327# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14329$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014330if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014332else
14333 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014334LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014336/* end confdefs.h. */
14337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338/* Override any GCC internal prototype to avoid an error.
14339 Use char because int might match the return type of a GCC
14340 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014341#ifdef __cplusplus
14342extern "C"
14343#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014344char rl_callback_handler_install ();
14345int
14346main ()
14347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014349 ;
14350 return 0;
14351}
14352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014354 ac_cv_lib_readline_rl_callback_handler_install=yes
14355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358rm -f core conftest.err conftest.$ac_objext \
14359 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014360LIBS=$ac_check_lib_save_LIBS
14361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14363$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014364if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014367
14368fi
14369
14370
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014371# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014373/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014374#include <readline/readline.h>
14375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014376if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014377 have_readline=yes
14378else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014379 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014380
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014381fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014382rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014383if test $have_readline = yes
14384then
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014386/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014387#include <readline/readline.h>
14388
14389_ACEOF
14390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014394
14395fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014396rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014397
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014399/* end confdefs.h. */
14400#include <readline/readline.h>
14401
14402_ACEOF
14403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014407
14408fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014409rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014410
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014411fi
14412
Martin v. Löwis0daad592001-09-30 21:09:59 +000014413# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14415$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014416if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014418else
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014420LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424/* Override any GCC internal prototype to avoid an error.
14425 Use char because int might match the return type of a GCC
14426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014427#ifdef __cplusplus
14428extern "C"
14429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014430char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014431int
14432main ()
14433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 ;
14436 return 0;
14437}
14438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014441else
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014444rm -f core conftest.err conftest.$ac_objext \
14445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014446LIBS=$ac_check_lib_save_LIBS
14447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14449$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014450if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014453
Martin v. Löwis0daad592001-09-30 21:09:59 +000014454fi
14455
Michael W. Hudson54241132001-12-07 15:38:26 +000014456
Thomas Wouters89d996e2007-09-08 17:39:28 +000014457# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14459$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014460if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014462else
14463 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014464LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014466/* end confdefs.h. */
14467
14468/* Override any GCC internal prototype to avoid an error.
14469 Use char because int might match the return type of a GCC
14470 builtin and then its argument prototype would still apply. */
14471#ifdef __cplusplus
14472extern "C"
14473#endif
14474char rl_completion_display_matches_hook ();
14475int
14476main ()
14477{
14478return rl_completion_display_matches_hook ();
14479 ;
14480 return 0;
14481}
14482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014483if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014484 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014488rm -f core conftest.err conftest.$ac_objext \
14489 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014490LIBS=$ac_check_lib_save_LIBS
14491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14493$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014497
14498fi
14499
14500
Martin v. Löwis0daad592001-09-30 21:09:59 +000014501# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14503$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014506else
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014508LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512/* Override any GCC internal prototype to avoid an error.
14513 Use char because int might match the return type of a GCC
14514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014515#ifdef __cplusplus
14516extern "C"
14517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014518char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014519int
14520main ()
14521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ;
14524 return 0;
14525}
14526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014529else
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014532rm -f core conftest.err conftest.$ac_objext \
14533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014534LIBS=$ac_check_lib_save_LIBS
14535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14537$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014538if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014541
Guido van Rossum353ae582001-07-10 16:45:32 +000014542fi
14543
Jack Jansendd19cf82001-12-06 22:36:17 +000014544
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014545# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014547/* end confdefs.h. */
14548#include <readline/readline.h>
14549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014551 have_readline=yes
14552else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014553 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014554
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014555fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014556rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014557if test $have_readline = yes
14558then
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014560/* end confdefs.h. */
14561#include <readline/readline.h>
14562
14563_ACEOF
14564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014568
14569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014570rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014571
14572fi
14573
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14575$as_echo_n "checking for append_history in -lreadline... " >&6; }
14576if ${ac_cv_lib_readline_append_history+:} false; then :
14577 $as_echo_n "(cached) " >&6
14578else
14579 ac_check_lib_save_LIBS=$LIBS
14580LIBS="-lreadline $READLINE_LIBS $LIBS"
14581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14582/* end confdefs.h. */
14583
14584/* Override any GCC internal prototype to avoid an error.
14585 Use char because int might match the return type of a GCC
14586 builtin and then its argument prototype would still apply. */
14587#ifdef __cplusplus
14588extern "C"
14589#endif
14590char append_history ();
14591int
14592main ()
14593{
14594return append_history ();
14595 ;
14596 return 0;
14597}
14598_ACEOF
14599if ac_fn_c_try_link "$LINENO"; then :
14600 ac_cv_lib_readline_append_history=yes
14601else
14602 ac_cv_lib_readline_append_history=no
14603fi
14604rm -f core conftest.err conftest.$ac_objext \
14605 conftest$ac_exeext conftest.$ac_ext
14606LIBS=$ac_check_lib_save_LIBS
14607fi
14608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14609$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14610if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14611
14612$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14613
14614fi
14615
14616
Martin v. Löwis82bca632006-02-10 20:49:30 +000014617# End of readline checks: restore LIBS
14618LIBS=$LIBS_no_readline
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14621$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014622if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014624else
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014627 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014628else
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014630/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014631
14632int main()
14633{
14634 int val1 = nice(1);
14635 if (val1 != -1 && val1 == nice(2))
14636 exit(0);
14637 exit(1);
14638}
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014641if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014642 ac_cv_broken_nice=yes
14643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014648fi
14649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650fi
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14653$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014654if test "$ac_cv_broken_nice" = yes
14655then
Martin v. Löwis11437992002-04-12 09:54:03 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014658
14659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14662$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014663if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014667 ac_cv_broken_poll=no
14668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014670/* end confdefs.h. */
14671
14672#include <poll.h>
14673
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014674int main()
14675{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014676 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014677 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014678
14679 close (42);
14680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014681 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014682 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014683 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014684 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014685 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014686 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014687 return 1;
14688}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014689
14690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014691if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014692 ac_cv_broken_poll=yes
14693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014700fi
14701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14703$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014704if test "$ac_cv_broken_poll" = yes
14705then
14706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014708
14709fi
14710
Brett Cannon43802422005-02-10 20:48:03 +000014711# 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 +000014712# (which is not required by ISO C or UNIX spec) and/or if we support
14713# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014714ac_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 +000014715#include <$ac_cv_struct_tm>
14716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717"
Victor Stinnere0be4232011-10-25 13:06:09 +020014718if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014719
14720cat >>confdefs.h <<_ACEOF
14721#define HAVE_STRUCT_TM_TM_ZONE 1
14722_ACEOF
14723
14724
14725fi
14726
14727if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014730
14731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14733"
Victor Stinnere0be4232011-10-25 13:06:09 +020014734if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738fi
14739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014741#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742_ACEOF
14743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14745$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014746if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014750/* end confdefs.h. */
14751#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752#if !HAVE_DECL_TZNAME
14753extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014754#endif
14755
14756int
14757main ()
14758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014765 ac_cv_var_tzname=yes
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014769rm -f core conftest.err conftest.$ac_objext \
14770 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14773$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014774 if test $ac_cv_var_tzname = yes; then
14775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014777
14778 fi
14779fi
14780
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014781
Martin v. Löwis1d459062005-03-14 21:23:33 +000014782# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14784$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014787else
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014790 ac_cv_working_tzset=no
14791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014794
14795#include <stdlib.h>
14796#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014797#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014798
14799#if HAVE_TZNAME
14800extern char *tzname[];
14801#endif
14802
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014803int main()
14804{
Brett Cannon18367812003-09-19 00:59:16 +000014805 /* Note that we need to ensure that not only does tzset(3)
14806 do 'something' with localtime, but it works as documented
14807 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014808 This includes making sure that tzname is set properly if
14809 tm->tm_zone does not exist since it is the alternative way
14810 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014811
14812 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014813 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014814 */
14815
Martin v. Löwis1d459062005-03-14 21:23:33 +000014816 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014817 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14818
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014819 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014820 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014821 if (localtime(&groundhogday)->tm_hour != 0)
14822 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014823#if HAVE_TZNAME
14824 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14825 if (strcmp(tzname[0], "UTC") ||
14826 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14827 exit(1);
14828#endif
Brett Cannon18367812003-09-19 00:59:16 +000014829
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014830 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014831 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014832 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014833 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014834#if HAVE_TZNAME
14835 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14836 exit(1);
14837#endif
Brett Cannon18367812003-09-19 00:59:16 +000014838
14839 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14840 tzset();
14841 if (localtime(&groundhogday)->tm_hour != 11)
14842 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014843#if HAVE_TZNAME
14844 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14845 exit(1);
14846#endif
14847
14848#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014849 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14850 exit(1);
14851 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14852 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014853#endif
Brett Cannon18367812003-09-19 00:59:16 +000014854
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014855 exit(0);
14856}
14857
14858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014859if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014860 ac_cv_working_tzset=yes
14861else
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014866fi
14867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868fi
14869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14871$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014872if test "$ac_cv_working_tzset" = yes
14873then
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014876
14877fi
14878
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014879# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14881$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014886/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014887#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014888int
14889main ()
14890{
14891
14892struct stat st;
14893st.st_mtim.tv_nsec = 1;
14894
14895 ;
14896 return 0;
14897}
14898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014900 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14905fi
14906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14908$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014909if test "$ac_cv_stat_tv_nsec" = yes
14910then
14911
Matthias Kloseb9621712010-04-24 17:59:49 +000014912$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014913
14914fi
14915
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014916# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14918$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014919if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014921else
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014923/* end confdefs.h. */
14924#include <sys/stat.h>
14925int
14926main ()
14927{
14928
14929struct stat st;
14930st.st_mtimespec.tv_nsec = 1;
14931
14932 ;
14933 return 0;
14934}
14935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014937 ac_cv_stat_tv_nsec2=yes
14938else
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14942fi
14943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14945$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014946if test "$ac_cv_stat_tv_nsec2" = yes
14947then
14948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014950
14951fi
14952
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014953# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014954ac_save_cppflags="$CPPFLAGS"
14955CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014956
14957for ac_header in curses.h ncurses.h
14958do :
14959 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14960ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14961if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14962 cat >>confdefs.h <<_ACEOF
14963#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14964_ACEOF
14965
14966fi
14967
14968done
14969
14970
14971# On Solaris, term.h requires curses.h
14972for ac_header in term.h
14973do :
14974 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14975#ifdef HAVE_CURSES_H
14976#include <curses.h>
14977#endif
14978
14979"
14980if test "x$ac_cv_header_term_h" = xyes; then :
14981 cat >>confdefs.h <<_ACEOF
14982#define HAVE_TERM_H 1
14983_ACEOF
14984
14985fi
14986
14987done
14988
14989
Jack Jansen666b1e72001-10-31 12:11:48 +000014990# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14992$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014993if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014995else
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014998#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014999int
15000main ()
15001{
Jack Jansen666b1e72001-10-31 12:11:48 +000015002
15003 int rtn;
15004 rtn = mvwdelch(0,0,0);
15005
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 ;
15007 return 0;
15008}
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015011 ac_cv_mvwdelch_is_expression=yes
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15016fi
15017
Matthias Kloseb9621712010-04-24 17:59:49 +000015018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15019$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015020
15021if test "$ac_cv_mvwdelch_is_expression" = yes
15022then
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015025
15026fi
15027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15029$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015030if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015032else
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015034/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015035#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015036int
15037main ()
15038{
Jack Jansen666b1e72001-10-31 12:11:48 +000015039
15040 WINDOW *w;
15041 w->_flags = 0;
15042
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015047if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015048 ac_cv_window_has_flags=yes
15049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15053fi
15054
Matthias Kloseb9621712010-04-24 17:59:49 +000015055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15056$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015057
Jack Jansen666b1e72001-10-31 12:11:48 +000015058
15059if test "$ac_cv_window_has_flags" = yes
15060then
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015063
15064fi
15065
Matthias Kloseb9621712010-04-24 17:59:49 +000015066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15067$as_echo_n "checking for is_term_resized... " >&6; }
15068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015069/* end confdefs.h. */
15070#include <curses.h>
15071int
15072main ()
15073{
15074void *x=is_term_resized
15075 ;
15076 return 0;
15077}
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015080
Matthias Kloseb9621712010-04-24 17:59:49 +000015081$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015082
Matthias Kloseb159a552010-04-25 21:00:44 +000015083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015084$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15087$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015088
15089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15091
Matthias Kloseb9621712010-04-24 17:59:49 +000015092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15093$as_echo_n "checking for resize_term... " >&6; }
15094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015095/* end confdefs.h. */
15096#include <curses.h>
15097int
15098main ()
15099{
15100void *x=resize_term
15101 ;
15102 return 0;
15103}
15104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015105if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015108
Matthias Kloseb159a552010-04-25 21:00:44 +000015109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015111else
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15113$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015114
15115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15117
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15119$as_echo_n "checking for resizeterm... " >&6; }
15120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015121/* end confdefs.h. */
15122#include <curses.h>
15123int
15124main ()
15125{
15126void *x=resizeterm
15127 ;
15128 return 0;
15129}
15130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015131if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015134
Matthias Kloseb159a552010-04-25 21:00:44 +000015135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015136$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015137else
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15139$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015140
15141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015143# last curses configure check
15144CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15147$as_echo "$as_me: checking for device files" >&6;}
15148
15149if test "x$cross_compiling" = xyes; then
15150 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15152$as_echo_n "checking for /dev/ptmx... " >&6; }
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15154$as_echo "not set" >&6; }
15155 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15156 fi
15157 if test "${ac_cv_file__dev_ptc+set}" != set; then
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15159$as_echo_n "checking for /dev/ptc... " >&6; }
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15161$as_echo "not set" >&6; }
15162 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15163 fi
15164fi
15165
Matthias Kloseb9621712010-04-24 17:59:49 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15167$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015168if ${ac_cv_file__dev_ptmx+:} false; then :
15169 $as_echo_n "(cached) " >&6
15170else
15171 test "$cross_compiling" = yes &&
15172 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15173if test -r "/dev/ptmx"; then
15174 ac_cv_file__dev_ptmx=yes
15175else
15176 ac_cv_file__dev_ptmx=no
15177fi
15178fi
15179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15180$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15181if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015182
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015183fi
15184
15185if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015188
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15191$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015192if ${ac_cv_file__dev_ptc+:} false; then :
15193 $as_echo_n "(cached) " >&6
15194else
15195 test "$cross_compiling" = yes &&
15196 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15197if test -r "/dev/ptc"; then
15198 ac_cv_file__dev_ptc=yes
15199else
15200 ac_cv_file__dev_ptc=no
15201fi
15202fi
15203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15204$as_echo "$ac_cv_file__dev_ptc" >&6; }
15205if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015206
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015207fi
15208
15209if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015210
Matthias Kloseb9621712010-04-24 17:59:49 +000015211$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015212
Neal Norwitz865400f2003-03-21 01:42:58 +000015213fi
15214
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015215if test "$have_long_long" = yes
15216then
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15218$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015219 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015221else
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015223 ac_cv_have_long_long_format="cross -- assuming no"
15224 if test x$GCC = xyes; then
15225 save_CFLAGS=$CFLAGS
15226 CFLAGS="$CFLAGS -Werror -Wformat"
15227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15228/* end confdefs.h. */
15229
15230 #include <stdio.h>
15231 #include <stddef.h>
15232
15233int
15234main ()
15235{
15236
15237 char *buffer;
15238 sprintf(buffer, "%lld", (long long)123);
15239 sprintf(buffer, "%lld", (long long)-123);
15240 sprintf(buffer, "%llu", (unsigned long long)123);
15241
15242 ;
15243 return 0;
15244}
15245_ACEOF
15246if ac_fn_c_try_compile "$LINENO"; then :
15247 ac_cv_have_long_long_format=yes
15248
15249fi
15250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15251 CFLAGS=$save_CFLAGS
15252 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015253else
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015255/* end confdefs.h. */
15256
15257 #include <stdio.h>
15258 #include <stddef.h>
15259 #include <string.h>
15260
15261 #ifdef HAVE_SYS_TYPES_H
15262 #include <sys/types.h>
15263 #endif
15264
15265 int main()
15266 {
15267 char buffer[256];
15268
15269 if (sprintf(buffer, "%lld", (long long)123) < 0)
15270 return 1;
15271 if (strcmp(buffer, "123"))
15272 return 1;
15273
15274 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15275 return 1;
15276 if (strcmp(buffer, "-123"))
15277 return 1;
15278
15279 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15280 return 1;
15281 if (strcmp(buffer, "123"))
15282 return 1;
15283
15284 return 0;
15285 }
15286
15287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015288if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015289 ac_cv_have_long_long_format=yes
15290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015295fi
15296
15297
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015298fi
15299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15301$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015302fi
15303
Mark Dickinson89d7d412009-12-31 20:50:59 +000015304if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015305then
15306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015308
15309fi
15310
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015311if test $ac_sys_system = Darwin
15312then
15313 LIBS="$LIBS -framework CoreFoundation"
15314fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015315
Matthias Kloseb9621712010-04-24 17:59:49 +000015316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15317$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015318if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015320else
Matthias Kloseb9621712010-04-24 17:59:49 +000015321 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015322 ac_cv_have_size_t_format="cross -- assuming yes"
15323
Thomas Wouters477c8d52006-05-27 19:21:47 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015326/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015327
Thomas Wouters477c8d52006-05-27 19:21:47 +000015328#include <stdio.h>
15329#include <stddef.h>
15330#include <string.h>
15331
Christian Heimes2c181612007-12-17 20:04:13 +000015332#ifdef HAVE_SYS_TYPES_H
15333#include <sys/types.h>
15334#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015335
15336#ifdef HAVE_SSIZE_T
15337typedef ssize_t Py_ssize_t;
15338#elif SIZEOF_VOID_P == SIZEOF_LONG
15339typedef long Py_ssize_t;
15340#else
15341typedef int Py_ssize_t;
15342#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015343
Christian Heimes2c181612007-12-17 20:04:13 +000015344int main()
15345{
15346 char buffer[256];
15347
Thomas Wouters477c8d52006-05-27 19:21:47 +000015348 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15349 return 1;
15350
Thomas Wouters89f507f2006-12-13 04:49:30 +000015351 if (strcmp(buffer, "123"))
15352 return 1;
15353
15354 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15355 return 1;
15356
15357 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015358 return 1;
15359
15360 return 0;
15361}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015362
Thomas Wouters477c8d52006-05-27 19:21:47 +000015363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015364if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015365 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15370 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015371fi
15372
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15375$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015376if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015379
15380fi
15381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015383#ifdef HAVE_SYS_TYPES_H
15384#include <sys/types.h>
15385#endif
15386#ifdef HAVE_SYS_SOCKET_H
15387#include <sys/socket.h>
15388#endif
15389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390"
Victor Stinnere0be4232011-10-25 13:06:09 +020015391if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015392
Martin v. Löwis11437992002-04-12 09:54:03 +000015393else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015396
15397fi
15398
Michael W. Hudson54241132001-12-07 15:38:26 +000015399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15401$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015402if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015404else
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015406 ac_cv_broken_mbstowcs=no
15407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015409/* end confdefs.h. */
15410
Stefan Krah19c21392012-11-22 23:47:32 +010015411#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015412#include<stdlib.h>
15413int main() {
15414 size_t len = -1;
15415 const char *str = "text";
15416 len = mbstowcs(NULL, str, 0);
15417 return (len != 4);
15418}
15419
15420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015421if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015422 ac_cv_broken_mbstowcs=no
15423else
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15427 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015428fi
15429
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015430fi
15431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15433$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015434if test "$ac_cv_broken_mbstowcs" = yes
15435then
15436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015438
15439fi
15440
Antoine Pitroub52ec782009-01-25 16:34:23 +000015441# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15443$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015444
15445# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015446if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015447 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015448if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015449then
15450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15454$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015455fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015456if test "$withval" = no
15457then
15458
15459$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15462$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015463fi
15464
Antoine Pitrou042b1282010-08-13 21:15:58 +000015465else
15466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15467$as_echo "no value specified" >&6; }
15468fi
15469
Antoine Pitroub52ec782009-01-25 16:34:23 +000015470
Matthias Kloseb17289e2012-03-15 19:51:34 +010015471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15472$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15473if ${ac_cv_computed_gotos+:} false; then :
15474 $as_echo_n "(cached) " >&6
15475else
15476 if test "$cross_compiling" = yes; then :
15477 if test "${with_computed_gotos+set}" = set; then
15478 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15479 else
15480 ac_cv_computed_gotos=no
15481 fi
15482else
15483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15484/* end confdefs.h. */
15485
15486int main(int argc, char **argv)
15487{
15488 static void *targets[1] = { &&LABEL1 };
15489 goto LABEL2;
15490LABEL1:
15491 return 0;
15492LABEL2:
15493 goto *targets[0];
15494 return 1;
15495}
15496
15497_ACEOF
15498if ac_fn_c_try_run "$LINENO"; then :
15499 ac_cv_computed_gotos=yes
15500else
15501 ac_cv_computed_gotos=no
15502fi
15503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15504 conftest.$ac_objext conftest.beam conftest.$ac_ext
15505fi
15506
15507fi
15508
15509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15510$as_echo "$ac_cv_computed_gotos" >&6; }
15511case "$ac_cv_computed_gotos" in yes*)
15512
15513$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15514
15515esac
15516
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015517case $ac_sys_system in
15518AIX*)
15519
15520$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15521 ;;
15522esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015523
Michael W. Hudson54241132001-12-07 15:38:26 +000015524
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015525
15526
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015527for h in `(cd $srcdir;echo Python/thread_*.h)`
15528do
15529 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15530done
15531
Michael W. Hudson54241132001-12-07 15:38:26 +000015532
Ned Deily0db50cf2014-07-25 12:41:31 -070015533SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15535$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015536for dir in $SRCDIRS; do
15537 if test ! -d $dir; then
15538 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015539 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015540done
Matthias Kloseb9621712010-04-24 17:59:49 +000015541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15542$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015543
Stefan Krah1919b7e2012-03-21 18:25:23 +010015544# Availability of -O2:
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15546$as_echo_n "checking for -O2... " >&6; }
15547saved_cflags="$CFLAGS"
15548CFLAGS="-O2"
15549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15550/* end confdefs.h. */
15551
15552int
15553main ()
15554{
15555
15556
15557 ;
15558 return 0;
15559}
15560_ACEOF
15561if ac_fn_c_try_compile "$LINENO"; then :
15562 have_O2=yes
15563else
15564 have_O2=no
15565fi
15566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15568$as_echo "$have_O2" >&6; }
15569CFLAGS="$saved_cflags"
15570
15571# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15572# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15574$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15575saved_cflags="$CFLAGS"
15576CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15577if test "$have_O2" = no; then
15578 CFLAGS=""
15579fi
15580if test "$cross_compiling" = yes; then :
15581 have_glibc_memmove_bug=undefined
15582else
15583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15584/* end confdefs.h. */
15585
15586#include <stdio.h>
15587#include <stdlib.h>
15588#include <string.h>
15589void foo(void *p, void *q) { memmove(p, q, 19); }
15590int main() {
15591 char a[32] = "123456789000000000";
15592 foo(&a[9], a);
15593 if (strcmp(a, "123456789123456789000000000") != 0)
15594 return 1;
15595 foo(a, &a[9]);
15596 if (strcmp(a, "123456789000000000") != 0)
15597 return 1;
15598 return 0;
15599}
15600
15601_ACEOF
15602if ac_fn_c_try_run "$LINENO"; then :
15603 have_glibc_memmove_bug=no
15604else
15605 have_glibc_memmove_bug=yes
15606fi
15607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15608 conftest.$ac_objext conftest.beam conftest.$ac_ext
15609fi
15610
15611CFLAGS="$saved_cflags"
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15613$as_echo "$have_glibc_memmove_bug" >&6; }
15614if test "$have_glibc_memmove_bug" = yes; then
15615
15616$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15617
15618fi
15619
15620if test "$have_gcc_asm_for_x87" = yes; then
15621 # Some versions of gcc miscompile inline asm:
15622 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15623 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15624 case $CC in
15625 *gcc*)
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15627$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15628 saved_cflags="$CFLAGS"
15629 CFLAGS="-O2"
15630 if test "$cross_compiling" = yes; then :
15631 have_ipa_pure_const_bug=undefined
15632else
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634/* end confdefs.h. */
15635
15636 __attribute__((noinline)) int
15637 foo(int *p) {
15638 int r;
15639 asm ( "movl \$6, (%1)\n\t"
15640 "xorl %0, %0\n\t"
15641 : "=r" (r) : "r" (p) : "memory"
15642 );
15643 return r;
15644 }
15645 int main() {
15646 int p = 8;
15647 if ((foo(&p) ? : p) != 6)
15648 return 1;
15649 return 0;
15650 }
15651
15652_ACEOF
15653if ac_fn_c_try_run "$LINENO"; then :
15654 have_ipa_pure_const_bug=no
15655else
15656 have_ipa_pure_const_bug=yes
15657fi
15658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15659 conftest.$ac_objext conftest.beam conftest.$ac_ext
15660fi
15661
15662 CFLAGS="$saved_cflags"
15663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15664$as_echo "$have_ipa_pure_const_bug" >&6; }
15665 if test "$have_ipa_pure_const_bug" = yes; then
15666
15667$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15668
15669 fi
15670 ;;
15671 esac
15672fi
15673
Ned Deily322f5ba2013-11-21 23:01:59 -080015674# ensurepip option
15675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15676$as_echo_n "checking for ensurepip... " >&6; }
15677
15678# Check whether --with-ensurepip was given.
15679if test "${with_ensurepip+set}" = set; then :
15680 withval=$with_ensurepip;
15681else
15682 with_ensurepip=upgrade
15683fi
15684
15685case $with_ensurepip in #(
15686 yes|upgrade) :
15687 ENSUREPIP=upgrade ;; #(
15688 install) :
15689 ENSUREPIP=install ;; #(
15690 no) :
15691 ENSUREPIP=no ;; #(
15692 *) :
15693 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15694esac
15695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15696$as_echo "$ENSUREPIP" >&6; }
15697
15698
Guido van Rossum627b2d71993-12-24 10:39:16 +000015699# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015700ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015701
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015702ac_config_files="$ac_config_files Modules/ld_so_aix"
15703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015705# This file is a shell script that caches the results of configure
15706# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015707# scripts and configure runs, see configure's option --config-cache.
15708# It is not useful on other systems. If it contains results you don't
15709# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015710#
Martin v. Löwis11437992002-04-12 09:54:03 +000015711# config.status only pays attention to the cache file if you give it
15712# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015713#
Skip Montanaro6dead952003-09-25 14:50:04 +000015714# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015715# loading this file, other *unset* `ac_cv_foo' will be assigned the
15716# following values.
15717
15718_ACEOF
15719
Guido van Rossumf78abae1997-01-21 22:02:36 +000015720# The following way of writing the cache mishandles newlines in values,
15721# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015723# Ultrix sh set writes to stderr and can't be redirected directly,
15724# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725(
15726 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15727 eval ac_val=\$$ac_var
15728 case $ac_val in #(
15729 *${as_nl}*)
15730 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15732$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 esac
15734 case $ac_var in #(
15735 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15737 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 esac ;;
15739 esac
15740 done
15741
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15744 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 # `set' does not quote correctly, so add quotes: double-quote
15746 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015748 "s/'/'\\\\''/g;
15749 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 *)
15752 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755 esac |
15756 sort
15757) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15763 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15765 :end' >>confcache
15766if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15767 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015768 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15770$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015771 if test ! -f "$cache_file" || test -h "$cache_file"; then
15772 cat confcache >"$cache_file"
15773 else
15774 case $cache_file in #(
15775 */* | ?:*)
15776 mv -f confcache "$cache_file"$$ &&
15777 mv -f "$cache_file"$$ "$cache_file" ;; #(
15778 *)
15779 mv -f confcache "$cache_file" ;;
15780 esac
15781 fi
15782 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015783 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15785$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015786 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015787fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015788rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015790test "x$prefix" = xNONE && prefix=$ac_default_prefix
15791# Let make expand exec_prefix.
15792test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015793
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015794DEFS=-DHAVE_CONFIG_H
15795
Skip Montanaro6dead952003-09-25 14:50:04 +000015796ac_libobjs=
15797ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015798U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015799for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15800 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015802 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15804 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15806 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015807done
15808LIBOBJS=$ac_libobjs
15809
15810LTLIBOBJS=$ac_ltlibobjs
15811
15812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814
Victor Stinnere0be4232011-10-25 13:06:09 +020015815: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015816ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015817ac_clean_files_save=$ac_clean_files
15818ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015819{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15820$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15821as_write_fail=0
15822cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015823#! $SHELL
15824# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015825# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015826# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015827# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015830ac_cs_recheck=false
15831ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833SHELL=\${CONFIG_SHELL-$SHELL}
15834export SHELL
15835_ASEOF
15836cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15837## -------------------- ##
15838## M4sh Initialization. ##
15839## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841# Be more Bourne compatible
15842DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015843if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 emulate sh
15845 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015847 # is contrary to our usage. Disable this feature.
15848 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015850else
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 case `(set -o) 2>/dev/null` in #(
15852 *posix*) :
15853 set -o posix ;; #(
15854 *) :
15855 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015857fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015858
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860as_nl='
15861'
15862export as_nl
15863# Printing a long string crashes Solaris 7 /usr/bin/printf.
15864as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15865as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15866as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15867# Prefer a ksh shell builtin over an external printf program on Solaris,
15868# but without wasting forks for bash or zsh.
15869if test -z "$BASH_VERSION$ZSH_VERSION" \
15870 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15871 as_echo='print -r --'
15872 as_echo_n='print -rn --'
15873elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15874 as_echo='printf %s\n'
15875 as_echo_n='printf %s'
15876else
15877 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15878 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15879 as_echo_n='/usr/ucb/echo -n'
15880 else
15881 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15882 as_echo_n_body='eval
15883 arg=$1;
15884 case $arg in #(
15885 *"$as_nl"*)
15886 expr "X$arg" : "X\\(.*\\)$as_nl";
15887 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15888 esac;
15889 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15890 '
15891 export as_echo_n_body
15892 as_echo_n='sh -c $as_echo_n_body as_echo'
15893 fi
15894 export as_echo_body
15895 as_echo='sh -c $as_echo_body as_echo'
15896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015897
15898# The user is always right.
15899if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 PATH_SEPARATOR=:
15901 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15902 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15903 PATH_SEPARATOR=';'
15904 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015907
15908# IFS
15909# We need space, tab and new line, in precisely that order. Quoting is
15910# there to prevent editors from complaining about space-tab.
15911# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15912# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015913IFS=" "" $as_nl"
15914
15915# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015916as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015917case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918 *[\\/]* ) as_myself=$0 ;;
15919 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015920for as_dir in $PATH
15921do
15922 IFS=$as_save_IFS
15923 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15925 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928 ;;
15929esac
15930# We did not find ourselves, most probably we were run as `sh COMMAND'
15931# in which case we are not to be found in the path.
15932if test "x$as_myself" = x; then
15933 as_myself=$0
15934fi
15935if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15937 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938fi
15939
Matthias Kloseb9621712010-04-24 17:59:49 +000015940# Unset variables that we do not need and which cause bugs (e.g. in
15941# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15942# suppresses any "Segmentation fault" message there. '((' could
15943# trigger a bug in pdksh 5.2.14.
15944for as_var in BASH_ENV ENV MAIL MAILPATH
15945do eval test x\${$as_var+set} = xset \
15946 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947done
15948PS1='$ '
15949PS2='> '
15950PS4='+ '
15951
15952# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015953LC_ALL=C
15954export LC_ALL
15955LANGUAGE=C
15956export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958# CDPATH.
15959(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15960
15961
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015962# as_fn_error STATUS ERROR [LINENO LOG_FD]
15963# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015964# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15965# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015966# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015967as_fn_error ()
15968{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015969 as_status=$1; test $as_status -eq 0 && as_status=1
15970 if test "$4"; then
15971 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15972 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015974 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 as_fn_exit $as_status
15976} # as_fn_error
15977
15978
15979# as_fn_set_status STATUS
15980# -----------------------
15981# Set $? to STATUS, without forking.
15982as_fn_set_status ()
15983{
15984 return $1
15985} # as_fn_set_status
15986
15987# as_fn_exit STATUS
15988# -----------------
15989# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15990as_fn_exit ()
15991{
15992 set +e
15993 as_fn_set_status $1
15994 exit $1
15995} # as_fn_exit
15996
15997# as_fn_unset VAR
15998# ---------------
15999# Portably unset VAR.
16000as_fn_unset ()
16001{
16002 { eval $1=; unset $1;}
16003}
16004as_unset=as_fn_unset
16005# as_fn_append VAR VALUE
16006# ----------------------
16007# Append the text in VALUE to the end of the definition contained in VAR. Take
16008# advantage of any shell optimizations that allow amortized linear growth over
16009# repeated appends, instead of the typical quadratic growth present in naive
16010# implementations.
16011if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16012 eval 'as_fn_append ()
16013 {
16014 eval $1+=\$2
16015 }'
16016else
16017 as_fn_append ()
16018 {
16019 eval $1=\$$1\$2
16020 }
16021fi # as_fn_append
16022
16023# as_fn_arith ARG...
16024# ------------------
16025# Perform arithmetic evaluation on the ARGs, and store the result in the
16026# global $as_val. Take advantage of shells that can avoid forks. The arguments
16027# must be portable across $(()) and expr.
16028if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16029 eval 'as_fn_arith ()
16030 {
16031 as_val=$(( $* ))
16032 }'
16033else
16034 as_fn_arith ()
16035 {
16036 as_val=`expr "$@" || test $? -eq 1`
16037 }
16038fi # as_fn_arith
16039
16040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041if expr a : '\(a\)' >/dev/null 2>&1 &&
16042 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16043 as_expr=expr
16044else
16045 as_expr=false
16046fi
16047
16048if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16049 as_basename=basename
16050else
16051 as_basename=false
16052fi
16053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16055 as_dirname=dirname
16056else
16057 as_dirname=false
16058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060as_me=`$as_basename -- "$0" ||
16061$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16062 X"$0" : 'X\(//\)$' \| \
16063 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016064$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065 sed '/^.*\/\([^/][^/]*\)\/*$/{
16066 s//\1/
16067 q
16068 }
16069 /^X\/\(\/\/\)$/{
16070 s//\1/
16071 q
16072 }
16073 /^X\/\(\/\).*/{
16074 s//\1/
16075 q
16076 }
16077 s/.*/./; q'`
16078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079# Avoid depending upon Character Ranges.
16080as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16081as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16082as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16083as_cr_digits='0123456789'
16084as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085
16086ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016087case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 xy) ECHO_C='\c';;
16092 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16093 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094 esac;;
16095*)
16096 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016097esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016098
Martin v. Löwis11437992002-04-12 09:54:03 +000016099rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100if test -d conf$$.dir; then
16101 rm -f conf$$.dir/conf$$.file
16102else
16103 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016106if (echo >conf$$.file) 2>/dev/null; then
16107 if ln -s conf$$.file conf$$ 2>/dev/null; then
16108 as_ln_s='ln -s'
16109 # ... but there are two gotchas:
16110 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16111 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016112 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016114 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 elif ln conf$$.file conf$$ 2>/dev/null; then
16116 as_ln_s=ln
16117 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016118 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016120else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016121 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16124rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016125
Matthias Kloseb9621712010-04-24 17:59:49 +000016126
16127# as_fn_mkdir_p
16128# -------------
16129# Create "$as_dir" as a directory, including parents if necessary.
16130as_fn_mkdir_p ()
16131{
16132
16133 case $as_dir in #(
16134 -*) as_dir=./$as_dir;;
16135 esac
16136 test -d "$as_dir" || eval $as_mkdir_p || {
16137 as_dirs=
16138 while :; do
16139 case $as_dir in #(
16140 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16141 *) as_qdir=$as_dir;;
16142 esac
16143 as_dirs="'$as_qdir' $as_dirs"
16144 as_dir=`$as_dirname -- "$as_dir" ||
16145$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16146 X"$as_dir" : 'X\(//\)[^/]' \| \
16147 X"$as_dir" : 'X\(//\)$' \| \
16148 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16149$as_echo X"$as_dir" |
16150 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16151 s//\1/
16152 q
16153 }
16154 /^X\(\/\/\)[^/].*/{
16155 s//\1/
16156 q
16157 }
16158 /^X\(\/\/\)$/{
16159 s//\1/
16160 q
16161 }
16162 /^X\(\/\).*/{
16163 s//\1/
16164 q
16165 }
16166 s/.*/./; q'`
16167 test -d "$as_dir" && break
16168 done
16169 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016170 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016171
16172
16173} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016174if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016175 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016176else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016177 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016178 as_mkdir_p=false
16179fi
16180
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016181
16182# as_fn_executable_p FILE
16183# -----------------------
16184# Test if FILE is an executable regular file.
16185as_fn_executable_p ()
16186{
16187 test -f "$1" && test -x "$1"
16188} # as_fn_executable_p
16189as_test_x='test -x'
16190as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
16192# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016193as_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 +000016194
16195# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016196as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016197
16198
Martin v. Löwis11437992002-04-12 09:54:03 +000016199exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016200## ----------------------------------- ##
16201## Main body of $CONFIG_STATUS script. ##
16202## ----------------------------------- ##
16203_ASEOF
16204test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
Matthias Kloseb9621712010-04-24 17:59:49 +000016206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16207# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016208# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209# values after options handling.
16210ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016211This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016212generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016213
16214 CONFIG_FILES = $CONFIG_FILES
16215 CONFIG_HEADERS = $CONFIG_HEADERS
16216 CONFIG_LINKS = $CONFIG_LINKS
16217 CONFIG_COMMANDS = $CONFIG_COMMANDS
16218 $ $0 $@
16219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220on `(hostname || uname -n) 2>/dev/null | sed 1q`
16221"
16222
Martin v. Löwis11437992002-04-12 09:54:03 +000016223_ACEOF
16224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225case $ac_config_files in *"
16226"*) set x $ac_config_files; shift; ac_config_files=$*;;
16227esac
16228
16229case $ac_config_headers in *"
16230"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16231esac
16232
16233
16234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016235# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016236config_files="$ac_config_files"
16237config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
Matthias Kloseb9621712010-04-24 17:59:49 +000016241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016242ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016243\`$as_me' instantiates files and other configuration actions
16244from templates according to the current configuration. Unless the files
16245and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016246
Matthias Kloseb9621712010-04-24 17:59:49 +000016247Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016248
16249 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 --config print configuration, then exit
16252 -q, --quiet, --silent
16253 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 -d, --debug don't remove temporary files
16255 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016256 --file=FILE[:TEMPLATE]
16257 instantiate the configuration file FILE
16258 --header=FILE[:TEMPLATE]
16259 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016260
16261Configuration files:
16262$config_files
16263
16264Configuration headers:
16265$config_headers
16266
Matthias Kloseb9621712010-04-24 17:59:49 +000016267Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16271ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016272ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016273python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016274configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016276
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016277Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016278This config.status script is free software; the Free Software Foundation
16279gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280
16281ac_pwd='$ac_pwd'
16282srcdir='$srcdir'
16283INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016284MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016285test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016286_ACEOF
16287
Matthias Kloseb9621712010-04-24 17:59:49 +000016288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16289# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016290ac_need_defaults=:
16291while test $# != 0
16292do
16293 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016294 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16296 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016297 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016299 --*=)
16300 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16301 ac_optarg=
16302 ac_shift=:
16303 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016305 ac_option=$1
16306 ac_optarg=$2
16307 ac_shift=shift
16308 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 esac
16310
Skip Montanaro6dead952003-09-25 14:50:04 +000016311 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016313 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16314 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 $as_echo "$ac_cs_version"; exit ;;
16317 --config | --confi | --conf | --con | --co | --c )
16318 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 debug=: ;;
16321 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016322 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 case $ac_optarg in
16324 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016325 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 esac
16327 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_need_defaults=false;;
16329 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016330 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016331 case $ac_optarg in
16332 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16333 esac
16334 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336 --he | --h)
16337 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016338 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016339Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16343 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16344 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
16346 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016347 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016348Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016349
Matthias Kloseb9621712010-04-24 17:59:49 +000016350 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016352
16353 esac
16354 shift
16355done
16356
Skip Montanaro6dead952003-09-25 14:50:04 +000016357ac_configure_extra_args=
16358
16359if $ac_cs_silent; then
16360 exec 6>/dev/null
16361 ac_configure_extra_args="$ac_configure_extra_args --silent"
16362fi
16363
16364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016366if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016367 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 shift
16369 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16370 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016373fi
16374
Martin v. Löwis11437992002-04-12 09:54:03 +000016375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377exec 5>>config.log
16378{
16379 echo
16380 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16381## Running $as_me. ##
16382_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016389
Matthias Kloseb9621712010-04-24 17:59:49 +000016390cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391
16392# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016393for ac_config_target in $ac_config_targets
16394do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395 case $ac_config_target in
16396 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16397 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16398 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016399 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16400 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16402 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016403 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016404 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016405 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406
Victor Stinnere0be4232011-10-25 13:06:09 +020016407 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 esac
16409done
16410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411
Martin v. Löwis11437992002-04-12 09:54:03 +000016412# If the user did not use the arguments to specify the items to instantiate,
16413# then the envvar interface is used. Set only those that are not.
16414# We use the long form for the default assignment because of an extremely
16415# bizarre bug on SunOS 4.1.3.
16416if $ac_need_defaults; then
16417 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16418 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16419fi
16420
Skip Montanaro6dead952003-09-25 14:50:04 +000016421# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016423# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016424# Hook for its removal unless debugging.
16425# Note that there is a small window in which the directory will not be cleaned:
16426# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016427$debug ||
16428{
Victor Stinnere0be4232011-10-25 13:06:09 +020016429 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016431 : "${ac_tmp:=$tmp}"
16432 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016434 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016435}
Martin v. Löwis11437992002-04-12 09:54:03 +000016436# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016437
Martin v. Löwis11437992002-04-12 09:54:03 +000016438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016440 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016441} ||
16442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443 tmp=./conf$$-$RANDOM
16444 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016445} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016446ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448# Set up the scripts for CONFIG_FILES section.
16449# No need to generate them if there are no CONFIG_FILES.
16450# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016451if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016452
Matthias Kloseb9621712010-04-24 17:59:49 +000016453
16454ac_cr=`echo X | tr X '\015'`
16455# On cygwin, bash can eat \r inside `` if the user requested igncr.
16456# But we know of no other shell where ac_cr would be empty at this
16457# point, so we can use a bashism as a fallback.
16458if test "x$ac_cr" = x; then
16459 eval ac_cr=\$\'\\r\'
16460fi
16461ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16462if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016463 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016464else
16465 ac_cs_awk_cr=$ac_cr
16466fi
16467
Victor Stinnere0be4232011-10-25 13:06:09 +020016468echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016469_ACEOF
16470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471
Matthias Kloseb9621712010-04-24 17:59:49 +000016472{
16473 echo "cat >conf$$subs.awk <<_ACEOF" &&
16474 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16475 echo "_ACEOF"
16476} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016477 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16478ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479ac_delim='%!_!# '
16480for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016481 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016482 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16485 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486 break
16487 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016488 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016489 else
16490 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492done
Matthias Kloseb9621712010-04-24 17:59:49 +000016493rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494
Matthias Kloseb9621712010-04-24 17:59:49 +000016495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016496cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016498sed -n '
16499h
16500s/^/S["/; s/!.*/"]=/
16501p
16502g
16503s/^[^!]*!//
16504:repl
16505t repl
16506s/'"$ac_delim"'$//
16507t delim
16508:nl
16509h
16510s/\(.\{148\}\)..*/\1/
16511t more1
16512s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16513p
16514n
16515b repl
16516:more1
16517s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16518p
16519g
16520s/.\{148\}//
16521t nl
16522:delim
16523h
16524s/\(.\{148\}\)..*/\1/
16525t more2
16526s/["\\]/\\&/g; s/^/"/; s/$/"/
16527p
16528b
16529:more2
16530s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16531p
16532g
16533s/.\{148\}//
16534t delim
16535' <conf$$subs.awk | sed '
16536/^[^""]/{
16537 N
16538 s/\n//
16539}
16540' >>$CONFIG_STATUS || ac_write_fail=1
16541rm -f conf$$subs.awk
16542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16543_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016544cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 for (key in S) S_is_set[key] = 1
16546 FS = ""
16547
16548}
16549{
16550 line = $ 0
16551 nfields = split(line, field, "@")
16552 substed = 0
16553 len = length(field[1])
16554 for (i = 2; i < nfields; i++) {
16555 key = field[i]
16556 keylen = length(key)
16557 if (S_is_set[key]) {
16558 value = S[key]
16559 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16560 len += length(value) + length(field[++i])
16561 substed = 1
16562 } else
16563 len += 1 + keylen
16564 }
16565
16566 print line
16567}
16568
16569_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016571cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16572if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16573 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16574else
16575 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016576fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016577 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016578_ACEOF
16579
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016580# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16581# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582# trailing colons and then remove the whole line if VPATH becomes empty
16583# (actually we leave an empty line to preserve line numbers).
16584if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016585 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16586h
16587s///
16588s/^/:/
16589s/[ ]*$/:/
16590s/:\$(srcdir):/:/g
16591s/:\${srcdir}:/:/g
16592s/:@srcdir@:/:/g
16593s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016595x
16596s/\(=[ ]*\).*/\1/
16597G
16598s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599s/^[^=]*=[ ]*$//
16600}'
16601fi
16602
Matthias Kloseb9621712010-04-24 17:59:49 +000016603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016604fi # test -n "$CONFIG_FILES"
16605
Matthias Kloseb9621712010-04-24 17:59:49 +000016606# Set up the scripts for CONFIG_HEADERS section.
16607# No need to generate them if there are no CONFIG_HEADERS.
16608# This happens for instance with `./config.status Makefile'.
16609if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016610cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016611BEGIN {
16612_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614# Transform confdefs.h into an awk script `defines.awk', embedded as
16615# here-document in config.status, that substitutes the proper values into
16616# config.h.in to produce config.h.
16617
16618# Create a delimiter string that does not exist in confdefs.h, to ease
16619# handling of long lines.
16620ac_delim='%!_!# '
16621for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016622 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16623 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 break
16625 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016626 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016627 else
16628 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16629 fi
16630done
16631
16632# For the awk script, D is an array of macro values keyed by name,
16633# likewise P contains macro parameters if any. Preserve backslash
16634# newline sequences.
16635
16636ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16637sed -n '
16638s/.\{148\}/&'"$ac_delim"'/g
16639t rset
16640:rset
16641s/^[ ]*#[ ]*define[ ][ ]*/ /
16642t def
16643d
16644:def
16645s/\\$//
16646t bsnl
16647s/["\\]/\\&/g
16648s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16649D["\1"]=" \3"/p
16650s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16651d
16652:bsnl
16653s/["\\]/\\&/g
16654s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16655D["\1"]=" \3\\\\\\n"\\/p
16656t cont
16657s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16658t cont
16659d
16660:cont
16661n
16662s/.\{148\}/&'"$ac_delim"'/g
16663t clear
16664:clear
16665s/\\$//
16666t bsnlc
16667s/["\\]/\\&/g; s/^/"/; s/$/"/p
16668d
16669:bsnlc
16670s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16671b cont
16672' <confdefs.h | sed '
16673s/'"$ac_delim"'/"\\\
16674"/g' >>$CONFIG_STATUS || ac_write_fail=1
16675
16676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16677 for (key in D) D_is_set[key] = 1
16678 FS = ""
16679}
16680/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16681 line = \$ 0
16682 split(line, arg, " ")
16683 if (arg[1] == "#") {
16684 defundef = arg[2]
16685 mac1 = arg[3]
16686 } else {
16687 defundef = substr(arg[1], 2)
16688 mac1 = arg[2]
16689 }
16690 split(mac1, mac2, "(") #)
16691 macro = mac2[1]
16692 prefix = substr(line, 1, index(line, defundef) - 1)
16693 if (D_is_set[macro]) {
16694 # Preserve the white space surrounding the "#".
16695 print prefix "define", macro P[macro] D[macro]
16696 next
16697 } else {
16698 # Replace #undef with comments. This is necessary, for example,
16699 # in the case of _POSIX_SOURCE, which is predefined and required
16700 # on some systems where configure will not decide to define it.
16701 if (defundef == "undef") {
16702 print "/*", prefix defundef, macro, "*/"
16703 next
16704 }
16705 }
16706}
16707{ print }
16708_ACAWK
16709_ACEOF
16710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016711 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016712fi # test -n "$CONFIG_HEADERS"
16713
16714
16715eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16716shift
16717for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718do
16719 case $ac_tag in
16720 :[FHLC]) ac_mode=$ac_tag; continue;;
16721 esac
16722 case $ac_mode$ac_tag in
16723 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016724 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 :[FH]-) ac_tag=-:-;;
16726 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16727 esac
16728 ac_save_IFS=$IFS
16729 IFS=:
16730 set x $ac_tag
16731 IFS=$ac_save_IFS
16732 shift
16733 ac_file=$1
16734 shift
16735
16736 case $ac_mode in
16737 :L) ac_source=$1;;
16738 :[FH])
16739 ac_file_inputs=
16740 for ac_f
16741 do
16742 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016743 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744 *) # Look for the file first in the build tree, then in the source tree
16745 # (if the path is not absolute). The absolute path cannot be DOS-style,
16746 # because $ac_f cannot contain `:'.
16747 test -f "$ac_f" ||
16748 case $ac_f in
16749 [\\/$]*) false;;
16750 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16751 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016752 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16755 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756 done
16757
16758 # Let's still pretend it is `configure' which instantiates (i.e., don't
16759 # use $as_me), people would be surprised to read:
16760 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016761 configure_input='Generated from '`
16762 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16763 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 if test x"$ac_file" != x-; then
16765 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016766 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16767$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 # Neutralize special characters interpreted by sed in replacement strings.
16770 case $configure_input in #(
16771 *\&* | *\|* | *\\* )
16772 ac_sed_conf_input=`$as_echo "$configure_input" |
16773 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16774 *) ac_sed_conf_input=$configure_input;;
16775 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776
16777 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016778 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16779 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780 esac
16781 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016782 esac
16783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016785$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016786 X"$ac_file" : 'X\(//\)[^/]' \| \
16787 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016789$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16791 s//\1/
16792 q
16793 }
16794 /^X\(\/\/\)[^/].*/{
16795 s//\1/
16796 q
16797 }
16798 /^X\(\/\/\)$/{
16799 s//\1/
16800 q
16801 }
16802 /^X\(\/\).*/{
16803 s//\1/
16804 q
16805 }
16806 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016807 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016808 ac_builddir=.
16809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810case "$ac_dir" in
16811.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16812*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016813 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016815 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 case $ac_top_builddir_sub in
16817 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16818 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16819 esac ;;
16820esac
16821ac_abs_top_builddir=$ac_pwd
16822ac_abs_builddir=$ac_pwd$ac_dir_suffix
16823# for backward compatibility:
16824ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016825
16826case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829 ac_top_srcdir=$ac_top_builddir_sub
16830 ac_abs_top_srcdir=$ac_pwd ;;
16831 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016833 ac_top_srcdir=$srcdir
16834 ac_abs_top_srcdir=$srcdir ;;
16835 *) # Relative name.
16836 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16837 ac_top_srcdir=$ac_top_build_prefix$srcdir
16838 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016839esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016841
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843 case $ac_mode in
16844 :F)
16845 #
16846 # CONFIG_FILE
16847 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016848
16849 case $INSTALL in
16850 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016853 ac_MKDIR_P=$MKDIR_P
16854 case $MKDIR_P in
16855 [\\/$]* | ?:[\\/]* ) ;;
16856 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16857 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016858_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859
Matthias Kloseb9621712010-04-24 17:59:49 +000016860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861# If the template does not know about datarootdir, expand it.
16862# FIXME: This hack should be removed a few years after 2.60.
16863ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016864ac_sed_dataroot='
16865/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 p
16867 q
16868}
16869/@datadir@/p
16870/@docdir@/p
16871/@infodir@/p
16872/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016873/@mandir@/p'
16874case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875*datarootdir*) ac_datarootdir_seen=yes;;
16876*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16878$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 ac_datarootdir_hack='
16882 s&@datadir@&$datadir&g
16883 s&@docdir@&$docdir&g
16884 s&@infodir@&$infodir&g
16885 s&@localedir@&$localedir&g
16886 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016887 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888esac
16889_ACEOF
16890
16891# Neutralize VPATH when `$srcdir' = `.'.
16892# Shell code in configure.ac might set extrasub.
16893# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016894cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16895ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016896$extrasub
16897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016899:t
16900/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016901s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016903s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904s&@srcdir@&$ac_srcdir&;t t
16905s&@abs_srcdir@&$ac_abs_srcdir&;t t
16906s&@top_srcdir@&$ac_top_srcdir&;t t
16907s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16908s&@builddir@&$ac_builddir&;t t
16909s&@abs_builddir@&$ac_abs_builddir&;t t
16910s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16911s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016912s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016913$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016914"
Victor Stinnere0be4232011-10-25 13:06:09 +020016915eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16916 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016918test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016919 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16920 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16921 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016923which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016924$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016925which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016926
Victor Stinnere0be4232011-10-25 13:06:09 +020016927 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016929 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16930 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016932 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016933 ;;
16934 :H)
16935 #
16936 # CONFIG_HEADER
16937 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016939 {
16940 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016941 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16942 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016943 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016944 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16946$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016948 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016949 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016950 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 fi
16952 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016953 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016954 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016955 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959
16960 esac
16961
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016962
16963 case $ac_file$ac_mode in
16964 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16965
16966 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967done # for ac_tag
16968
Guido van Rossum627b2d71993-12-24 10:39:16 +000016969
Matthias Kloseb9621712010-04-24 17:59:49 +000016970as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016971_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016972ac_clean_files=$ac_clean_files_save
16973
Matthias Kloseb9621712010-04-24 17:59:49 +000016974test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016975 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977
16978# configure is writing to config.log, and then calls config.status.
16979# config.status does its own redirection, appending to config.log.
16980# Unfortunately, on DOS this fails, as config.log is still kept open
16981# by configure, so config.status won't be able to write to it; its
16982# output is simply discarded. So we exec the FD to /dev/null,
16983# effectively closing config.log, so it can be properly (re)opened and
16984# appended to by config.status. When coming back to configure, we
16985# need to make the FD available again.
16986if test "$no_create" != yes; then
16987 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016988 ac_config_status_args=
16989 test "$silent" = yes &&
16990 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016992 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 exec 5>>config.log
16994 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16995 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016996 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016997fi
16998if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17000$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017001fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017002
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017003
Christian Heimes75ed8902013-11-20 01:11:18 +010017004echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017005if test ! -f Modules/Setup
17006then
17007 cp $srcdir/Modules/Setup.dist Modules/Setup
17008fi
17009
Christian Heimes75ed8902013-11-20 01:11:18 +010017010echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017011if test ! -f Modules/Setup.local
17012then
17013 echo "# Edit this file for local setup changes" >Modules/Setup.local
17014fi
17015
Christian Heimes75ed8902013-11-20 01:11:18 +010017016echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017017$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17018 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017019 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017020mv config.c Modules