blob: 46f82870aabfea70f4da5a3e6a261fbd1f4381c1 [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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
697BUILDEXEEXT
698EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200700PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200701PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200702MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706GREP
707CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000708OBJEXT
709EXEEXT
710ac_ct_CC
711CPPFLAGS
712LDFLAGS
713CFLAGS
714CC
715EXPORT_MACOSX_DEPLOYMENT_TARGET
716CONFIGURE_MACOSX_DEPLOYMENT_TARGET
717SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200718_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000720FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800722FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200738PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500747HAS_HG
748HGBRANCH
749HGTAG
750HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400751BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000752target_alias
753host_alias
754build_alias
755LIBS
756ECHO_T
757ECHO_N
758ECHO_C
759DEFS
760mandir
761localedir
762libdir
763psdir
764pdfdir
765dvidir
766htmldir
767infodir
768docdir
769oldincludedir
770includedir
771localstatedir
772sharedstatedir
773sysconfdir
774datadir
775datarootdir
776libexecdir
777sbindir
778bindir
779program_transform_name
780prefix
781exec_prefix
782PACKAGE_URL
783PACKAGE_BUGREPORT
784PACKAGE_STRING
785PACKAGE_VERSION
786PACKAGE_TARNAME
787PACKAGE_NAME
788PATH_SEPARATOR
789SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000790ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000791ac_user_opts='
792enable_option_checking
793enable_universalsdk
794with_universal_archs
795with_framework_name
796enable_framework
797with_gcc
798with_cxx_main
799with_suffix
800enable_shared
801enable_profiling
802with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100803with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100804with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_libs
806with_system_expat
807with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100808with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000809enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700810with_tcltk_includes
811with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_dbmliborder
813with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_threads
815with_thread
816enable_ipv6
817with_doc_strings
818with_tsc
819with_pymalloc
820with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_fpectl
822with_libm
823with_libc
824enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800826with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000827'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 ac_precious_vars='build_alias
829host_alias
830target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100831MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832CC
833CFLAGS
834LDFLAGS
835LIBS
836CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100837CPP
838PKG_CONFIG
839PKG_CONFIG_PATH
840PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844ac_init_help=
845ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000846ac_unrecognized_opts=
847ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# The variables have the same names as the options, with
849# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862x_includes=NONE
863x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000864
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879includedir='${prefix}/include'
880oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 ac_prev=
899 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200903 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *=) ac_optarg= ;;
905 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Accept the important Cygnus configure options, so we can diagnose typos.
909
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 case $ac_dashdash$ac_option in
911 --)
912 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -bindir | --bindir | --bindi | --bind | --bin | --bi)
915 ac_prev=bindir ;;
916 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 -cache-file | --cache-file | --cache-fil | --cache-fi \
925 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
926 ac_prev=cache_file ;;
927 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
928 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 cache_file=$ac_optarg ;;
930
931 --config-cache | -C)
932 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
940 | --dataroo | --dataro | --datar)
941 ac_prev=datarootdir ;;
942 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
943 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
944 datarootdir=$ac_optarg ;;
945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200950 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt_orig=$ac_useropt
952 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
953 case $ac_user_opts in
954 *"
955"enable_$ac_useropt"
956"*) ;;
957 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
958 ac_unrecognized_sep=', ';;
959 esac
960 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961
962 -docdir | --docdir | --docdi | --doc | --do)
963 ac_prev=docdir ;;
964 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
965 docdir=$ac_optarg ;;
966
967 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
968 ac_prev=dvidir ;;
969 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
970 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
989 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
990 | --exec | --exe | --ex)
991 ac_prev=exec_prefix ;;
992 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
993 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
994 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --with-gas.
999 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 -help | --help | --hel | --he | -h)
1002 ac_init_help=long ;;
1003 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1004 ac_init_help=recursive ;;
1005 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1006 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1014 ac_prev=htmldir ;;
1015 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1016 | --ht=*)
1017 htmldir=$ac_optarg ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -includedir | --includedir | --includedi | --included | --include \
1020 | --includ | --inclu | --incl | --inc)
1021 ac_prev=includedir ;;
1022 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1023 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -infodir | --infodir | --infodi | --infod | --info | --inf)
1027 ac_prev=infodir ;;
1028 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libdir | --libdir | --libdi | --libd)
1032 ac_prev=libdir ;;
1033 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1037 | --libexe | --libex | --libe)
1038 ac_prev=libexecdir ;;
1039 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1040 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -localedir | --localedir | --localedi | --localed | --locale)
1044 ac_prev=localedir ;;
1045 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1046 localedir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_prev=localstatedir ;;
1051 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1056 ac_prev=mandir ;;
1057 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 # Obsolete; use --without-fp.
1062 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 no_create=yes ;;
1067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1069 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1070 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1073 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1074 | --oldin | --oldi | --old | --ol | --o)
1075 ac_prev=oldincludedir ;;
1076 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1077 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1078 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1082 ac_prev=prefix ;;
1083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1087 | --program-pre | --program-pr | --program-p)
1088 ac_prev=program_prefix ;;
1089 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1090 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1094 | --program-suf | --program-su | --program-s)
1095 ac_prev=program_suffix ;;
1096 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1097 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-transform-name | --program-transform-name \
1101 | --program-transform-nam | --program-transform-na \
1102 | --program-transform-n | --program-transform- \
1103 | --program-transform | --program-transfor \
1104 | --program-transfo | --program-transf \
1105 | --program-trans | --program-tran \
1106 | --progr-tra | --program-tr | --program-t)
1107 ac_prev=program_transform_name ;;
1108 -program-transform-name=* | --program-transform-name=* \
1109 | --program-transform-nam=* | --program-transform-na=* \
1110 | --program-transform-n=* | --program-transform-=* \
1111 | --program-transform=* | --program-transfor=* \
1112 | --program-transfo=* | --program-transf=* \
1113 | --program-trans=* | --program-tran=* \
1114 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001117 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1118 ac_prev=pdfdir ;;
1119 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1120 pdfdir=$ac_optarg ;;
1121
1122 -psdir | --psdir | --psdi | --psd | --ps)
1123 ac_prev=psdir ;;
1124 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1125 psdir=$ac_optarg ;;
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1128 | -silent | --silent | --silen | --sile | --sil)
1129 silent=yes ;;
1130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1132 ac_prev=sbindir ;;
1133 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1134 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136
1137 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1138 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1139 | --sharedst | --shareds | --shared | --share | --shar \
1140 | --sha | --sh)
1141 ac_prev=sharedstatedir ;;
1142 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1143 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1144 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1145 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 -site | --site | --sit)
1149 ac_prev=site ;;
1150 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1154 ac_prev=srcdir ;;
1155 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1159 | --syscon | --sysco | --sysc | --sys | --sy)
1160 ac_prev=sysconfdir ;;
1161 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1162 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1171 verbose=yes ;;
1172
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 -version | --version | --versio | --versi | --vers | -V)
1174 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt_orig=$ac_useropt
1182 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1183 case $ac_user_opts in
1184 *"
1185"with_$ac_useropt"
1186"*) ;;
1187 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1188 ac_unrecognized_sep=', ';;
1189 esac
1190 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 --x)
1209 # Obsolete; use --with-x.
1210 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1213 | --x-incl | --x-inc | --x-in | --x-i)
1214 ac_prev=x_includes ;;
1215 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1216 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1220 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1221 ac_prev=x_libraries ;;
1222 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1223 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1227Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 ;;
1229
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 *=*)
1231 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1232 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 case $ac_envvar in #(
1234 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 export $ac_envvar ;;
1239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001245 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
1248 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249done
1250
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254fi
1255
Matthias Kloseb9621712010-04-24 17:59:49 +00001256if test -n "$ac_unrecognized_opts"; then
1257 case $enable_option_checking in
1258 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1261 esac
1262fi
1263
1264# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1266 datadir sysconfdir sharedstatedir localstatedir includedir \
1267 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1268 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 # Remove trailing slashes.
1272 case $ac_val in
1273 */ )
1274 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1275 eval $ac_var=\$ac_val;;
1276 esac
1277 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 [\\/$]* | ?:[\\/]* ) continue;;
1280 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001283done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# There might be people who depend on the old broken behavior: `$host'
1286# used to hold the argument of --host etc.
1287# FIXME: To remove some day.
1288build=$build_alias
1289host=$host_alias
1290target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Martin v. Löwis11437992002-04-12 09:54:03 +00001292# FIXME: To remove some day.
1293if test "x$host_alias" != x; then
1294 if test "x$build_alias" = x; then
1295 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 elif test "x$build_alias" != "x$host_alias"; then
1297 cross_compiling=yes
1298 fi
1299fi
1300
1301ac_tool_prefix=
1302test -n "$host_alias" && ac_tool_prefix=$host_alias-
1303
1304test "$silent" = yes && exec 6>/dev/null
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_pwd=`pwd` && test -n "$ac_pwd" &&
1308ac_ls_di=`ls -di .` &&
1309ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315# Find the source files, if location was not specified.
1316if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001319 ac_confdir=`$as_dirname -- "$as_myself" ||
1320$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1321 X"$as_myself" : 'X\(//\)[^/]' \| \
1322 X"$as_myself" : 'X\(//\)$' \| \
1323 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1324$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)[^/].*/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\).*/{
1338 s//\1/
1339 q
1340 }
1341 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 srcdir=..
1345 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
1347 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349if test ! -r "$srcdir/$ac_unique_file"; then
1350 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1354ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 pwd)`
1357# When building in place, set srcdir=.
1358if test "$ac_abs_confdir" = "$ac_pwd"; then
1359 srcdir=.
1360fi
1361# Remove unnecessary trailing slashes from srcdir.
1362# Double slashes in file names in object file debugging info
1363# mess up M-x gdb in Emacs.
1364case $srcdir in
1365*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1366esac
1367for ac_var in $ac_precious_vars; do
1368 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_env_${ac_var}_value=\$${ac_var}
1370 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1372done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373
Martin v. Löwis11437992002-04-12 09:54:03 +00001374#
1375# Report the --help message.
1376#
1377if test "$ac_init_help" = "long"; then
1378 # Omit some internal or obsolete options to make the list less imposing.
1379 # This message is too long to be a string in the A/UX 3.1 sh.
1380 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001381\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
1383Usage: $0 [OPTION]... [VAR=VALUE]...
1384
1385To assign environment variables (e.g., CC, CFLAGS...), specify them as
1386VAR=VALUE. See below for descriptions of some of the useful variables.
1387
1388Defaults for the options are specified in brackets.
1389
1390Configuration:
1391 -h, --help display this help and exit
1392 --help=short display options specific to this package
1393 --help=recursive display the short help of all the included packages
1394 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --cache-file=FILE cache test results in FILE [disabled]
1397 -C, --config-cache alias for \`--cache-file=config.cache'
1398 -n, --no-create do not create output files
1399 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401Installation directories:
1402 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407By default, \`make install' will install all the files in
1408\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1409an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1410for instance \`--prefix=\$HOME'.
1411
1412For better control, use the options below.
1413
1414Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 --bindir=DIR user executables [EPREFIX/bin]
1416 --sbindir=DIR system admin executables [EPREFIX/sbin]
1417 --libexecdir=DIR program executables [EPREFIX/libexec]
1418 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1419 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1420 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1421 --libdir=DIR object code libraries [EPREFIX/lib]
1422 --includedir=DIR C header files [PREFIX/include]
1423 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1424 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1425 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1426 --infodir=DIR info documentation [DATAROOTDIR/info]
1427 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1428 --mandir=DIR man documentation [DATAROOTDIR/man]
1429 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1430 --htmldir=DIR html documentation [DOCDIR]
1431 --dvidir=DIR dvi documentation [DOCDIR]
1432 --pdfdir=DIR pdf documentation [DOCDIR]
1433 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435
1436 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001437
1438System types:
1439 --build=BUILD configure for building on BUILD [guessed]
1440 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
1442fi
1443
1444if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001446 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001447 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 cat <<\_ACEOF
1449
1450Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1453 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001454 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001455 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --enable-framework[=INSTALLDIR]
1457 Build (MacOSX|Darwin) framework
1458 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001459 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001460 --enable-loadable-sqlite-extensions
1461 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-ipv6 Enable ipv6 (with ipv4) support
1463 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001464 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Optional Packages:
1468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001470 --with-universal-archs=ARCH
1471 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001472 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001473 --with-framework-name=FRAMEWORK
1474 specify an alternate name of the framework built
1475 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-cxx-main=<compiler>
1478 compile main() and link python executable with C++
1479 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-suffix=.exe set executable suffix
1481 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001482 --with-hash-algorithm=[fnv|siphash24]
1483 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001484 --with-address-sanitizer
1485 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001487 --with-system-expat build pyexpat module using an installed expat
1488 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001489 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001490 --with-system-libmpdec build _decimal module using an installed libmpdec
1491 library
Ned Deilyd819b932013-09-06 01:07:05 -07001492 --with-tcltk-includes='-I...'
1493 override search for Tcl and Tk include files
1494 --with-tcltk-libs='-L...'
1495 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001496 --with-dbmliborder=db1:db2:...
1497 order to check db backends for dbm. Valid value is a
1498 colon separated string with the backend names
1499 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-threads[=DIRECTORY]
1502 disable/enable thread support
1503 --with(out)-thread[=DIRECTORY]
1504 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001506 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001508 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-fpectl enable SIGFPE catching
1510 --with-libm=STRING math library
1511 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001512 --with(out)-computed-gotos
1513 Use computed gotos in evaluation loop (enabled by
1514 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001515 --with(out)-ensurepip=[=upgrade]
1516 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001519 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CC C compiler command
1521 CFLAGS C compiler flags
1522 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1523 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001525 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001528 PKG_CONFIG path to pkg-config utility
1529 PKG_CONFIG_PATH
1530 directories to add to pkg-config's search path
1531 PKG_CONFIG_LIBDIR
1532 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001533
1534Use these variables to override the choices made by `configure' or to help
1535it to find libraries and programs with nonstandard names/locations.
1536
Georg Brandle2e15612009-05-20 18:25:10 +00001537Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540fi
1541
1542if test "$ac_init_help" = "recursive"; then
1543 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 test -d "$ac_dir" ||
1546 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 ac_builddir=.
1549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550case "$ac_dir" in
1551.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 case $ac_top_builddir_sub in
1557 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559 esac ;;
1560esac
1561ac_abs_top_builddir=$ac_pwd
1562ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563# for backward compatibility:
1564ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 ac_top_srcdir=$ac_top_builddir_sub
1570 ac_abs_top_srcdir=$ac_pwd ;;
1571 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 ac_top_srcdir=$srcdir
1574 ac_abs_top_srcdir=$srcdir ;;
1575 *) # Relative name.
1576 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577 ac_top_srcdir=$ac_top_build_prefix$srcdir
1578 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001579esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 cd "$ac_dir" || { ac_status=$?; continue; }
1583 # Check for guested configure.
1584 if test -f "$ac_srcdir/configure.gnu"; then
1585 echo &&
1586 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587 elif test -f "$ac_srcdir/configure"; then
1588 echo &&
1589 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 fi || ac_status=$?
1593 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 done
1595fi
1596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001598if $ac_init_version; then
1599 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001600python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001603Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604This configure script is free software; the Free Software Foundation
1605gives unlimited permission to copy, distribute and modify it.
1606_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001609
1610## ------------------------ ##
1611## Autoconf initialization. ##
1612## ------------------------ ##
1613
1614# ac_fn_c_try_compile LINENO
1615# --------------------------
1616# Try to compile conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_compile ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext
1621 if { { ac_try="$ac_compile"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_compile") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest.$ac_objext; then :
1640 ac_retval=0
1641else
1642 $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_compile
1651
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1673 test $ac_status = 0; } > conftest.i && {
1674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
Matthias Kloseb9621712010-04-24 17:59:49 +00001689# ac_fn_c_try_link LINENO
1690# -----------------------
1691# Try to link conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_link ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext conftest$ac_exeext
1696 if { { ac_try="$ac_link"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_link") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest$ac_exeext && {
1715 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001716 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
1725 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1726 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1727 # interfere with the next link command; also delete a directory that is
1728 # left behind by Apple's compiler. We do this before executing the actions.
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_link
1734
Matthias Kloseb9621712010-04-24 17:59:49 +00001735# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1738# the include files in INCLUDES and setting the cache variable VAR
1739# accordingly.
1740ac_fn_c_check_header_mongrel ()
1741{
1742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1745$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001746if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 $as_echo_n "(cached) " >&6
1748fi
1749eval ac_res=\$$3
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1751$as_echo "$ac_res" >&6; }
1752else
1753 # Is the header compilable?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1755$as_echo_n "checking $2 usability... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 ac_header_compiler=yes
1763else
1764 ac_header_compiler=no
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1768$as_echo "$ac_header_compiler" >&6; }
1769
1770# Is the header present?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1772$as_echo_n "checking $2 presence... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775#include <$2>
1776_ACEOF
1777if ac_fn_c_try_cpp "$LINENO"; then :
1778 ac_header_preproc=yes
1779else
1780 ac_header_preproc=no
1781fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1784$as_echo "$ac_header_preproc" >&6; }
1785
1786# So? What about this header?
1787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1788 yes:no: )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1790$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1793 ;;
1794 no:yes:* )
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1796$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1798$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1800$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1802$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001806## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001807## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 ) | sed "s/^/$as_me: WARNING: /" >&2
1809 ;;
1810esac
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=\$ac_header_compiler"
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
1821fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001823
1824} # ac_fn_c_check_header_mongrel
1825
1826# ac_fn_c_try_run LINENO
1827# ----------------------
1828# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1829# that executables *can* be run.
1830ac_fn_c_try_run ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 if { { ac_try="$ac_link"
1834case "(($ac_try" in
1835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1836 *) ac_try_echo=$ac_try;;
1837esac
1838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1839$as_echo "$ac_try_echo"; } >&5
1840 (eval "$ac_link") 2>&5
1841 ac_status=$?
1842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1843 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1844 { { case "(($ac_try" in
1845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1846 *) ac_try_echo=$ac_try;;
1847esac
1848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1849$as_echo "$ac_try_echo"; } >&5
1850 (eval "$ac_try") 2>&5
1851 ac_status=$?
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; }; }; then :
1854 ac_retval=0
1855else
1856 $as_echo "$as_me: program exited with status $ac_status" >&5
1857 $as_echo "$as_me: failed program was:" >&5
1858sed 's/^/| /' conftest.$ac_ext >&5
1859
1860 ac_retval=$ac_status
1861fi
1862 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 as_fn_set_status $ac_retval
1865
1866} # ac_fn_c_try_run
1867
1868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1869# -------------------------------------------------------
1870# Tests whether HEADER exists and can be compiled using the include files in
1871# INCLUDES, setting the cache variable VAR accordingly.
1872ac_fn_c_check_header_compile ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001877if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001878 $as_echo_n "(cached) " >&6
1879else
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883#include <$2>
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 eval "$3=yes"
1887else
1888 eval "$3=no"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_header_compile
1898
Matthias Kloseb9621712010-04-24 17:59:49 +00001899# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1900# -------------------------------------------
1901# Tests whether TYPE exists after having included INCLUDES, setting cache
1902# variable VAR accordingly.
1903ac_fn_c_check_type ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof ($2))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof (($2)))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938
1939else
1940 eval "$3=yes"
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_check_type
1952
1953# ac_fn_c_find_uintX_t LINENO BITS VAR
1954# ------------------------------------
1955# Finds an unsigned integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_uintX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1961$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1969 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
1973int
1974main ()
1975{
1976static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001977test_array [0] = 0;
1978return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984if ac_fn_c_try_compile "$LINENO"; then :
1985 case $ac_type in #(
1986 uint$2_t) :
1987 eval "$3=yes" ;; #(
1988 *) :
1989 eval "$3=\$ac_type" ;;
1990esac
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001993 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995else
1996 break
1997fi
1998 done
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005} # ac_fn_c_find_uintX_t
2006
2007# ac_fn_c_find_intX_t LINENO BITS VAR
2008# -----------------------------------
2009# Finds a signed integer type with width BITS, setting cache variable VAR
2010# accordingly.
2011ac_fn_c_find_intX_t ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2015$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017 $as_echo_n "(cached) " >&6
2018else
2019 eval "$3=no"
2020 # Order is important - never check a type that is potentially smaller
2021 # than half of the expected target width.
2022 for ac_type in int$2_t 'int' 'long int' \
2023 'long long int' 'short int' 'signed char'; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002044int
2045main ()
2046{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002047static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002048 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057
2058else
2059 case $ac_type in #(
2060 int$2_t) :
2061 eval "$3=yes" ;; #(
2062 *) :
2063 eval "$3=\$ac_type" ;;
2064esac
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002069 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002070
2071else
2072 break
2073fi
2074 done
2075fi
2076eval ac_res=\$$3
2077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081} # ac_fn_c_find_intX_t
2082
2083# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2084# --------------------------------------------
2085# Tries to find the compile-time value of EXPR in a program that includes
2086# INCLUDES, setting VAR accordingly. Returns whether the value could be
2087# computed
2088ac_fn_c_compute_int ()
2089{
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 if test "$cross_compiling" = yes; then
2092 # Depending upon the size, compute the lo and hi bounds.
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_lo=0 ac_mid=0
2109 while :; do
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=$ac_mid; break
2126else
2127 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2128 if test $ac_lo -le $ac_mid; then
2129 ac_lo= ac_hi=
2130 break
2131 fi
2132 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 done
2136else
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=-1 ac_mid=-1
2153 while :; do
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_lo=$ac_mid; break
2170else
2171 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2172 if test $ac_mid -le $ac_hi; then
2173 ac_lo= ac_hi=
2174 break
2175 fi
2176 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 done
2180else
2181 ac_lo= ac_hi=
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186# Binary search between lo and hi bounds.
2187while test "x$ac_lo" != "x$ac_hi"; do
2188 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002196test_array [0] = 0;
2197return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 ac_hi=$ac_mid
2205else
2206 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209done
2210case $ac_lo in #((
2211?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2212'') ac_retval=1 ;;
2213esac
2214 else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218static long int longval () { return $2; }
2219static unsigned long int ulongval () { return $2; }
2220#include <stdio.h>
2221#include <stdlib.h>
2222int
2223main ()
2224{
2225
2226 FILE *f = fopen ("conftest.val", "w");
2227 if (! f)
2228 return 1;
2229 if (($2) < 0)
2230 {
2231 long int i = longval ();
2232 if (i != ($2))
2233 return 1;
2234 fprintf (f, "%ld", i);
2235 }
2236 else
2237 {
2238 unsigned long int i = ulongval ();
2239 if (i != ($2))
2240 return 1;
2241 fprintf (f, "%lu", i);
2242 }
2243 /* Do not output a trailing newline, as this causes \r\n confusion
2244 on some platforms. */
2245 return ferror (f) || fclose (f) != 0;
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_run "$LINENO"; then :
2252 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2253else
2254 ac_retval=1
2255fi
2256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2257 conftest.$ac_objext conftest.beam conftest.$ac_ext
2258rm -f conftest.val
2259
2260 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 as_fn_set_status $ac_retval
2263
2264} # ac_fn_c_compute_int
2265
2266# ac_fn_c_check_func LINENO FUNC VAR
2267# ----------------------------------
2268# Tests whether FUNC exists, setting the cache variable VAR accordingly
2269ac_fn_c_check_func ()
2270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2273$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2281#define $2 innocuous_$2
2282
2283/* System header to define __stub macros and hopefully few prototypes,
2284 which can conflict with char $2 (); below.
2285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2286 <limits.h> exists even on freestanding compilers. */
2287
2288#ifdef __STDC__
2289# include <limits.h>
2290#else
2291# include <assert.h>
2292#endif
2293
2294#undef $2
2295
2296/* Override any GCC internal prototype to avoid an error.
2297 Use char because int might match the return type of a GCC
2298 builtin and then its argument prototype would still apply. */
2299#ifdef __cplusplus
2300extern "C"
2301#endif
2302char $2 ();
2303/* The GNU C library defines this for functions which it implements
2304 to always fail with ENOSYS. Some functions are actually named
2305 something starting with __ and the normal name is an alias. */
2306#if defined __stub_$2 || defined __stub___$2
2307choke me
2308#endif
2309
2310int
2311main ()
2312{
2313return $2 ();
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_link "$LINENO"; then :
2319 eval "$3=yes"
2320else
2321 eval "$3=no"
2322fi
2323rm -f core conftest.err conftest.$ac_objext \
2324 conftest$ac_exeext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_func
2332
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002333# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2334# ---------------------------------------------
2335# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2336# accordingly.
2337ac_fn_c_check_decl ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 as_decl_name=`echo $2|sed 's/ *(.*//'`
2341 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2343$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2344if eval \${$3+:} false; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$4
2350int
2351main ()
2352{
2353#ifndef $as_decl_name
2354#ifdef __cplusplus
2355 (void) $as_decl_use;
2356#else
2357 (void) $as_decl_name;
2358#endif
2359#endif
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$3=yes"
2367else
2368 eval "$3=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372eval ac_res=\$$3
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2374$as_echo "$ac_res" >&6; }
2375 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376
2377} # ac_fn_c_check_decl
2378
Matthias Kloseb9621712010-04-24 17:59:49 +00002379# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2380# ----------------------------------------------------
2381# Tries to find if the field MEMBER exists in type AGGR, after including
2382# INCLUDES, setting cache variable VAR accordingly.
2383ac_fn_c_check_member ()
2384{
2385 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2387$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002388if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo_n "(cached) " >&6
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h. */
2409$5
2410int
2411main ()
2412{
2413static $2 ac_aggr;
2414if (sizeof ac_aggr.$3)
2415return 0;
2416 ;
2417 return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$4=yes"
2422else
2423 eval "$4=no"
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428fi
2429eval ac_res=\$$4
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002432 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002433
2434} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002436This file contains any messages produced by compilers while
2437running configure, to aid debugging if configure makes a mistake.
2438
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002439It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002440generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442 $ $0 $@
2443
2444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002446{
2447cat <<_ASUNAME
2448## --------- ##
2449## Platform. ##
2450## --------- ##
2451
2452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2453uname -m = `(uname -m) 2>/dev/null || echo unknown`
2454uname -r = `(uname -r) 2>/dev/null || echo unknown`
2455uname -s = `(uname -s) 2>/dev/null || echo unknown`
2456uname -v = `(uname -v) 2>/dev/null || echo unknown`
2457
2458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2460
2461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2468
2469_ASUNAME
2470
2471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 $as_echo "PATH: $as_dir"
2477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
2480} >&5
2481
2482cat >&5 <<_ACEOF
2483
2484
2485## ----------- ##
2486## Core tests. ##
2487## ----------- ##
2488
2489_ACEOF
2490
2491
2492# Keep a trace of the command line.
2493# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002496# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002497ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_configure_args0=
2499ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002500ac_must_keep_next=false
2501for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002502do
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 for ac_arg
2504 do
2505 case $ac_arg in
2506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2508 | -silent | --silent | --silen | --sile | --sil)
2509 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 esac
2513 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520 case $ac_arg in
2521 *=* | --config-cache | -C | -disable-* | --disable-* \
2522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2524 | -with-* | --with-* | -without-* | --without-* | --x)
2525 case "$ac_configure_args0 " in
2526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2527 esac
2528 ;;
2529 -* ) ac_must_keep_next=true ;;
2530 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
Matthias Kloseb9621712010-04-24 17:59:49 +00002537{ ac_configure_args0=; unset ac_configure_args0;}
2538{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
2540# When interrupted or exit'd, cleanup temporary files, and complete
2541# config.log. We remove comments because anyway the quotes in there
2542# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543# WARNING: Use '\'' to represent an apostrophe within the trap.
2544# 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 +00002545trap 'exit_status=$?
2546 # Save into config.log some information that might help in debugging.
2547 {
2548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
2554 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555(
2556 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2557 eval ac_val=\$$ac_var
2558 case $ac_val in #(
2559 *${as_nl}*)
2560 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2562$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 esac
2564 case $ac_var in #(
2565 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2567 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac ;;
2569 esac
2570 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2573 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 "s/'\''/'\''\\\\'\'''\''/g;
2576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2577 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002580 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac |
2582 sort
2583)
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002585
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002587## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 echo
2590 for ac_var in $ac_subst_vars
2591 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 eval ac_val=\$$ac_var
2593 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 done | sort
2598 echo
2599
2600 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002604 echo
2605 for ac_var in $ac_subst_files
2606 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 eval ac_val=\$$ac_var
2608 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 done | sort
2613 echo
2614 fi
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002618## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 echo
2623 fi
2624 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 $as_echo "$as_me: caught signal $ac_signal"
2626 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 rm -f core *.core core.conftest.* &&
2629 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002632for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002634done
2635ac_signal=0
2636
2637# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
Matthias Kloseb9621712010-04-24 17:59:49 +00002640$as_echo "/* confdefs.h */" > confdefs.h
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Predefined preprocessor variables.
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_NAME "$PACKAGE_NAME"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_VERSION "$PACKAGE_VERSION"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_STRING "$PACKAGE_STRING"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2662_ACEOF
2663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_URL "$PACKAGE_URL"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668
2669# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670# Prefer an explicitly selected file to automatically selected ones.
2671ac_site_file1=NONE
2672ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 # We do not want a PATH search for config.site.
2675 case $CONFIG_SITE in #((
2676 -*) ac_site_file1=./$CONFIG_SITE;;
2677 */*) ac_site_file1=$CONFIG_SITE;;
2678 *) ac_site_file1=./$CONFIG_SITE;;
2679 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 ac_site_file1=$prefix/share/config.site
2682 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683else
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 ac_site_file1=$ac_default_prefix/share/config.site
2685 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688do
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 test "x$ac_site_file" = xNONE && continue
2690 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2692$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002694 . "$ac_site_file" \
2695 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002698See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699 fi
2700done
2701
2702if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # Some versions of bash will fail to source /dev/null (special files
2704 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2705 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2707$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2710 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2715$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 >$cache_file
2717fi
2718
2719# Check that the precious variables saved in the cache have kept the same
2720# value.
2721ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2724 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2726 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 case $ac_old_set,$ac_new_set in
2728 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2730$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 +00002731 ac_cache_corrupted=: ;;
2732 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2734$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_cache_corrupted=: ;;
2736 ,);;
2737 *)
2738 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 # differences in whitespace do not lead to failure.
2740 ac_old_val_w=`echo x $ac_old_val`
2741 ac_new_val_w=`echo x $ac_new_val`
2742 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2744$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2745 ac_cache_corrupted=:
2746 else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2748$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2749 eval $ac_var=\$ac_old_val
2750 fi
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2752$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2754$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 fi;;
2756 esac
2757 # Pass precious variables to config.status.
2758 if test "$ac_new_set" = set; then
2759 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002760 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 *) ac_arg=$ac_var=$ac_new_val ;;
2762 esac
2763 case " $ac_configure_args " in
2764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 esac
2767 fi
2768done
2769if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2773$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002774 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002776## -------------------- ##
2777## Main body of script. ##
2778## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779
Guido van Rossum7f43da71994-08-01 12:15:30 +00002780ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2784ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002785
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788
Trent Nelson5595ab52012-10-17 04:47:31 -04002789if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002790 # If we're building out-of-tree, we need to make sure the following
2791 # resources get picked up before their $srcdir counterparts.
2792 # Objects/ -> typeslots.inc
2793 # Include/ -> Python-ast.h, graminit.h
2794 # Python/ -> importlib.h
2795 # (A side effect of this is that these resources will automatically be
2796 # regenerated when building out-of-tree, regardless of whether or not
2797 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2798 # off.)
2799 BASECPPFLAGS="-IObjects -IInclude -IPython"
2800else
2801 BASECPPFLAGS=""
2802fi
2803
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804
2805
2806
2807
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002808if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809then
2810# Extract the first word of "hg", so it can be a program name with args.
2811set dummy hg; ac_word=$2
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002814if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 $as_echo_n "(cached) " >&6
2816else
2817 if test -n "$HAS_HG"; then
2818 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2819else
2820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821for as_dir in $PATH
2822do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 ac_cv_prog_HAS_HG="found"
2828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831done
2832 done
2833IFS=$as_save_IFS
2834
2835 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2836fi
2837fi
2838HAS_HG=$ac_cv_prog_HAS_HG
2839if test -n "$HAS_HG"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2841$as_echo "$HAS_HG" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848else
2849HAS_HG=no-repository
2850fi
2851if test $HAS_HG = found
2852then
2853 HGVERSION="hg id -i \$(srcdir)"
2854 HGTAG="hg id -t \$(srcdir)"
2855 HGBRANCH="hg id -b \$(srcdir)"
2856else
2857 HGVERSION=""
2858 HGTAG=""
2859 HGBRANCH=""
2860fi
2861
2862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002866ac_aux_dir=
2867for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2868 if test -f "$ac_dir/install-sh"; then
2869 ac_aux_dir=$ac_dir
2870 ac_install_sh="$ac_aux_dir/install-sh -c"
2871 break
2872 elif test -f "$ac_dir/install.sh"; then
2873 ac_aux_dir=$ac_dir
2874 ac_install_sh="$ac_aux_dir/install.sh -c"
2875 break
2876 elif test -f "$ac_dir/shtool"; then
2877 ac_aux_dir=$ac_dir
2878 ac_install_sh="$ac_aux_dir/shtool install -c"
2879 break
2880 fi
2881done
2882if test -z "$ac_aux_dir"; then
2883 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2884fi
2885
2886# These three variables are undocumented and unsupported,
2887# and are intended to be withdrawn in a future Autoconf release.
2888# They can cause serious problems if a builder's source tree is in a directory
2889# whose full name contains unusual characters.
2890ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2891ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2892ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2893
2894
2895# Make sure we can run config.sub.
2896$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2897 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2898
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2900$as_echo_n "checking build system type... " >&6; }
2901if ${ac_cv_build+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903else
2904 ac_build_alias=$build_alias
2905test "x$ac_build_alias" = x &&
2906 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2907test "x$ac_build_alias" = x &&
2908 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2909ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2911
2912fi
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2914$as_echo "$ac_cv_build" >&6; }
2915case $ac_cv_build in
2916*-*-*) ;;
2917*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2918esac
2919build=$ac_cv_build
2920ac_save_IFS=$IFS; IFS='-'
2921set x $ac_cv_build
2922shift
2923build_cpu=$1
2924build_vendor=$2
2925shift; shift
2926# Remember, the first character of IFS is used to create $*,
2927# except with old shells:
2928build_os=$*
2929IFS=$ac_save_IFS
2930case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2931
2932
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2934$as_echo_n "checking host system type... " >&6; }
2935if ${ac_cv_host+:} false; then :
2936 $as_echo_n "(cached) " >&6
2937else
2938 if test "x$host_alias" = x; then
2939 ac_cv_host=$ac_cv_build
2940else
2941 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2942 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2943fi
2944
2945fi
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2947$as_echo "$ac_cv_host" >&6; }
2948case $ac_cv_host in
2949*-*-*) ;;
2950*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2951esac
2952host=$ac_cv_host
2953ac_save_IFS=$IFS; IFS='-'
2954set x $ac_cv_host
2955shift
2956host_cpu=$1
2957host_vendor=$2
2958shift; shift
2959# Remember, the first character of IFS is used to create $*,
2960# except with old shells:
2961host_os=$*
2962IFS=$ac_save_IFS
2963case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2964
2965
2966
doko@python.orga10e4a92013-01-25 18:45:12 +01002967
2968
Ned Deilyfcbc2462014-08-22 13:32:49 -07002969# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2970rm -f pybuilddir.txt
2971
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972if test "$cross_compiling" = yes; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2974$as_echo_n "checking for python interpreter for cross build... " >&6; }
2975 if test -z "$PYTHON_FOR_BUILD"; then
2976 for interp in python$PACKAGE_VERSION python3 python; do
2977 which $interp >/dev/null 2>&1 || continue
2978 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2979 break
2980 fi
2981 interp=
2982 done
2983 if test x$interp = x; then
2984 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2985 fi
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2987$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002988 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 +02002989 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002990elif test "$cross_compiling" = maybe; then
2991 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992else
2993 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Benjamin Petersond23f8222009-04-05 19:13:16 +00002998if test "$prefix" != "/"; then
2999 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3000fi
3001
3002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003005# We don't use PACKAGE_ variables, and they cause conflicts
3006# with other autoconf-based packages that include Python.h
3007grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3008rm confdefs.h
3009mv confdefs.h.new confdefs.h
3010
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003011
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003012VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003013
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003014# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015
3016SOVERSION=1.0
3017
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018# The later defininition of _XOPEN_SOURCE disables certain features
3019# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003022
3023
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003029
3030
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003036
3037
Martin v. Löwisd6320502004-08-12 13:45:08 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003042
3043
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050
3051
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003052define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003053
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003054# Arguments passed to configure.
3055
3056CONFIG_ARGS="$ac_configure_args"
3057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3059$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003061if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 case $enableval in
3064 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 # Locate the best usable SDK, see Mac/README.txt for more
3066 # information
3067 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3071 if test ! -d "${enableval}"
3072 then
3073 enableval=/
3074 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
3078 case $enableval in
3079 no)
3080 UNIVERSALSDK=
3081 enable_universalsdk=
3082 ;;
3083 *)
3084 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 if test ! -d "${UNIVERSALSDK}"
3086 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003087 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 ;;
3090 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003091
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093else
3094
3095 UNIVERSALSDK=
3096 enable_universalsdk=
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100if test -n "${UNIVERSALSDK}"
3101then
Matthias Kloseb9621712010-04-24 17:59:49 +00003102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3103$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104else
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deily87adb6e2013-10-18 21:09:56 -07003111ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003112
Ned Deilycbfb9a52012-06-23 16:02:19 -07003113# For backward compatibility reasons we prefer to select '32-bit' if available,
3114# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003116if test "`uname -s`" = "Darwin"
3117then
3118 if test -n "${UNIVERSALSDK}"
3119 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003120 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003121 then
3122 UNIVERSAL_ARCHS="intel"
3123 fi
3124 fi
3125fi
3126
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003127
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3129$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
3131# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134 UNIVERSAL_ARCHS="$withval"
3135
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136fi
3137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138if test -n "${UNIVERSALSDK}"
3139then
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3141$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3142else
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3144$as_echo "no" >&6; }
3145fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147
3148# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003149if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 withval=$with_framework_name;
3151 PYTHONFRAMEWORK=${withval}
3152 PYTHONFRAMEWORKDIR=${withval}.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3154
3155else
3156
3157 PYTHONFRAMEWORK=Python
3158 PYTHONFRAMEWORKDIR=Python.framework
3159 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3160
3161fi
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003164if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003166 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003167 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003168 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 esac
3170 case $enableval in
3171 no)
3172 PYTHONFRAMEWORK=
3173 PYTHONFRAMEWORKDIR=no-framework
3174 PYTHONFRAMEWORKPREFIX=
3175 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176 FRAMEWORKINSTALLFIRST=
3177 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 FRAMEWORKALTINSTALLFIRST=
3179 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003180 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 if test "x${prefix}" = "xNONE"; then
3182 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003187 ;;
3188 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003189 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003192 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3194 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003195 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003197
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE" ; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003200
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003204
3205 case "${enableval}" in
3206 /System*)
3207 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3208 if test "${prefix}" = "NONE" ; then
3209 # See below
3210 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3211 fi
3212 ;;
3213
3214 /Library*)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217
3218 */Library/Frameworks)
3219 MDIR="`dirname "${enableval}"`"
3220 MDIR="`dirname "${MDIR}"`"
3221 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3222
3223 if test "${prefix}" = "NONE"; then
3224 # User hasn't specified the
3225 # --prefix option, but wants to install
3226 # the framework in a non-default location,
3227 # ensure that the compatibility links get
3228 # installed relative to that prefix as well
3229 # instead of in /usr/local.
3230 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3231 fi
3232 ;;
3233
3234 *)
3235 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3236 ;;
3237 esac
3238
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003247 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3248
3249 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Guido van Rossum563e7081996-09-10 18:20:48 +00003253else
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003257 PYTHONFRAMEWORKPREFIX=
3258 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 FRAMEWORKINSTALLFIRST=
3260 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261 FRAMEWORKALTINSTALLFIRST=
3262 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003263 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3266 else
3267 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3268 fi
Jack Jansene578a632001-08-15 01:27:14 +00003269 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272fi
3273
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
3275
Michael W. Hudson54241132001-12-07 15:38:26 +00003276
3277
3278
3279
Jack Jansene578a632001-08-15 01:27:14 +00003280
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281
3282
3283
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003284
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003285
Ned Deilyb8f944f2013-11-21 22:42:25 -08003286
Jack Jansene578a632001-08-15 01:27:14 +00003287##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003288## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003289## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291# Set name for machine-dependent library files
3292
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3294$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295if test -z "$MACHDEP"
3296then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 # avoid using uname for cross builds
3298 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003299 # ac_sys_system and ac_sys_release are used for setting
3300 # a lot of different things including 'define_xopen_source'
3301 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 case "$host" in
3303 *-*-linux*)
3304 ac_sys_system=Linux
3305 ;;
3306 *-*-cygwin*)
3307 ac_sys_system=Cygwin
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 ac_sys_release=
3315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003317 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003318 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 fi
3324 ac_md_system=`echo $ac_sys_system |
3325 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3326 ac_md_release=`echo $ac_sys_release |
3327 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3328 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003329
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003331 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003333 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003334 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003335 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337fi
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
3354 *)
3355 # for now, limit cross builds to known configurations
3356 MACHDEP="unknown"
3357 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3358 esac
3359 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3360fi
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3363# disable features if it is defined, without any means to access these
3364# features as extensions. For these systems, we skip the definition of
3365# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3366# some feature, make sure there is no alternative way to access this
3367# feature. Also, when using wildcards, make sure you have verified the
3368# need for not defining _XOPEN_SOURCE on all systems matching the
3369# wildcard, and that the wildcard does not include future systems
3370# (which may remove their limitations).
3371case $ac_sys_system/$ac_sys_release in
3372 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3373 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003374 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003375 # In addition, Stefan Krah confirms that issue #1244610 exists through
3376 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378 define_xopen_source=no
3379 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3380 # also defined. This can be overridden by defining _BSD_SOURCE
3381 # As this has a different meaning on Linux, only define it on OpenBSD
3382
Matthias Kloseb9621712010-04-24 17:59:49 +00003383$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003384
3385 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003386 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3388 # also defined. This can be overridden by defining _BSD_SOURCE
3389 # As this has a different meaning on Linux, only define it on OpenBSD
3390
Matthias Kloseb9621712010-04-24 17:59:49 +00003391$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003392
3393 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003394 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3395 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3396 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003397 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 +00003398 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003399 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3400 # request to enable features supported by the standard as a request
3401 # to disable features not supported by the standard. The best way
3402 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3403 # entirely and define __EXTENSIONS__ instead.
3404 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003405 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003406 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3407 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003408 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003409 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003410 define_xopen_source=no;;
3411 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003414 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003415 # On FreeBSD 4, the math functions C89 does not cover are never defined
3416 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3417 FreeBSD/4.*)
3418 define_xopen_source=no;;
3419 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3420 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3421 # identifies itself as Darwin/7.*
3422 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # disables platform specific features beyond repair.
3424 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3425 # has no effect, don't bother defining them
3426 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003427 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003428 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3431 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3432 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003433 AIX/4)
3434 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003435 AIX/5)
3436 if test `uname -r` -eq 1; then
3437 define_xopen_source=no
3438 fi
3439 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003440 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3441 # defining NI_NUMERICHOST.
3442 QNX/6.3.2)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446esac
3447
3448if test $define_xopen_source = yes
3449then
Victor Stinner14d098d2011-09-07 22:29:43 +02003450 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003451
Victor Stinner14d098d2011-09-07 22:29:43 +02003452$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
3455 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3456 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3457 # several APIs are not declared. Since this is also needed in some
3458 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Matthias Kloseb9621712010-04-24 17:59:49 +00003460$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
3462
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003463
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003464$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003466fi
3467
Christian Heimes647cd872013-12-07 23:39:33 +01003468# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3469case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003470 hp*|HP*)
3471 define_stdc_a1=yes;;
3472 *)
3473 define_stdc_a1=no;;
3474esac
3475
3476if test $define_stdc_a1 = yes
3477then
Christian Heimes647cd872013-12-07 23:39:33 +01003478
3479$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3480
Christian Heimesb02bcae2013-12-08 15:21:08 +01003481fi
Christian Heimes647cd872013-12-07 23:39:33 +01003482
Guido van Rossum91922671997-10-09 20:24:13 +00003483#
3484# SGI compilers allow the specification of the both the ABI and the
3485# ISA on the command line. Depending on the values of these switches,
3486# different and often incompatable code will be generated.
3487#
3488# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3489# thus supply support for various ABI/ISA combinations. The MACHDEP
3490# variable is also adjusted.
3491#
3492
3493if test ! -z "$SGI_ABI"
3494then
3495 CC="cc $SGI_ABI"
3496 LDFLAGS="$SGI_ABI $LDFLAGS"
3497 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3500$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3503# it may influence the way we can build extensions, so distutils
3504# needs to check it
3505
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506
Jack Jansen6b08a402004-06-03 12:41:45 +00003507CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003509
Guido van Rossum627b2d71993-12-24 10:39:16 +00003510# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003511
3512# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3513# for debug/optimization stuff. BASECFLAGS is for flags that are required
3514# just to get things to compile and link. Users are free to override OPT
3515# when running configure or make. The build should not break if they do.
3516# BASECFLAGS should generally not be messed with, however.
3517
3518# XXX shouldn't some/most/all of this code be merged with the stuff later
3519# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3521$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003526 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003527 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528 without_gcc=yes;;
3529 yes) CC=gcc
3530 without_gcc=no;;
3531 *) CC=$withval
3532 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003533 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003537 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003538 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003539 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003540 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541fi
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3544$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003545
Guido van Rossum8b131c51995-03-09 14:10:13 +00003546# If the user switches compilers, we can't believe the cache
3547if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3548then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003549 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003550(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003551fi
3552
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003553# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3554# when the compiler supports them, but we don't always want -O2, and
3555# we set -g later.
3556if test -z "$CFLAGS"; then
3557 CFLAGS=
3558fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003559
3560if test "$ac_sys_system" = "Darwin"
3561then
3562 # Compiler selection on MacOSX is more complicated than
3563 # AC_PROG_CC can handle, see Mac/README.txt for more
3564 # information
3565 if test -z "${CC}"
3566 then
3567 found_gcc=
3568 found_clang=
3569 as_save_IFS=$IFS; IFS=:
3570 for as_dir in $PATH
3571 do
3572 IFS=$as_save_IFS
3573 if test -x $as_dir/gcc; then
3574 if test -z "${found_gcc}"; then
3575 found_gcc=$as_dir/gcc
3576 fi
3577 fi
3578 if test -x $as_dir/clang; then
3579 if test -z "${found_clang}"; then
3580 found_clang=$as_dir/clang
3581 fi
3582 fi
3583 done
3584 IFS=$as_save_IFS
3585
3586 if test -n "$found_gcc" -a -n "$found_clang"
3587 then
3588 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3591$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594 fi
3595
3596
3597 elif test -z "$found_gcc" -a -n "$found_clang"
3598 then
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3600$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3601 CC="$found_clang"
3602 CXX="$found_clang++"
3603
3604 elif test -z "$found_gcc" -a -z "$found_clang"
3605 then
3606 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3607 if test -n "${found_clang}"
3608 then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3610$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3611 CC="${found_clang}"
3612 CXX="`/usr/bin/xcrun -find clang++`"
3613
3614 # else: use default behaviour
3615 fi
3616 fi
3617 fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619ac_ext=c
3620ac_cpp='$CPP $CPPFLAGS'
3621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3623ac_compiler_gnu=$ac_cv_c_compiler_gnu
3624if test -n "$ac_tool_prefix"; then
3625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3626set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003629if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
Jack Jansendd19cf82001-12-06 22:36:17 +00003650fi
3651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3655$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663if test -z "$ac_cv_prog_CC"; then
3664 ac_ct_CC=$CC
3665 # Extract the first word of "gcc", so it can be a program name with args.
3666set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003669if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 if test -n "$ac_ct_CC"; then
3673 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690fi
3691fi
3692ac_ct_CC=$ac_cv_prog_ac_ct_CC
3693if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3695$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test "x$ac_ct_CC" = x; then
3702 CC=""
3703 else
3704 case $cross_compiling:$ac_tool_warned in
3705yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708ac_tool_warned=yes ;;
3709esac
3710 CC=$ac_ct_CC
3711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
3713 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003714fi
3715
Jack Jansendd19cf82001-12-06 22:36:17 +00003716if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 if test -n "$ac_tool_prefix"; then
3718 # 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 +00003719set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757if test -z "$CC"; then
3758 # Extract the first word of "cc", so it can be a program name with args.
3759set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$CC"; then
3766 ac_cv_prog_CC="$CC" # Let the user override the test.
3767else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3777 ac_prog_rejected=yes
3778 continue
3779 fi
3780 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
3783 fi
3784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test $ac_prog_rejected = yes; then
3789 # We found a bogon in the path, so make sure we never use it.
3790 set dummy $ac_cv_prog_CC
3791 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793 # We chose a different compiler from the bogus one.
3794 # However, it has the same basename, so the bogon will be chosen
3795 # first if we set CC to just the basename; use the full file name.
3796 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003797 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003798 fi
3799fi
3800fi
3801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003809fi
3810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
3813if test -z "$CC"; then
3814 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 do
3817 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003821if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003823else
3824 if test -n "$CC"; then
3825 ac_cv_prog_CC="$CC" # Let the user override the test.
3826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 $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 +00003836 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838done
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842fi
3843fi
3844CC=$ac_cv_prog_CC
3845if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003851fi
3852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 test -n "$CC" && break
3855 done
3856fi
3857if test -z "$CC"; then
3858 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003860do
3861 # Extract the first word of "$ac_prog", so it can be a program name with args.
3862set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003865if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003867else
3868 if test -n "$ac_ct_CC"; then
3869 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3870else
3871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874 IFS=$as_save_IFS
3875 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 $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 +00003880 break 2
3881 fi
3882done
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887fi
3888ac_ct_CC=$ac_cv_prog_ac_ct_CC
3889if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3891$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892else
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 test -n "$ac_ct_CC" && break
3899done
Michael W. Hudson54241132001-12-07 15:38:26 +00003900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 if test "x$ac_ct_CC" = x; then
3902 CC=""
3903 else
3904 case $cross_compiling:$ac_tool_warned in
3905yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_tool_warned=yes ;;
3909esac
3910 CC=$ac_ct_CC
3911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
3913
3914fi
3915
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003921
3922# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003923$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3924set X $ac_compile
3925ac_compiler=$2
3926for ac_option in --version -v -V -qversion; do
3927 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928case "(($ac_try" in
3929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3930 *) ac_try_echo=$ac_try;;
3931esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3933$as_echo "$ac_try_echo"; } >&5
3934 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 if test -s conftest.err; then
3937 sed '10a\
3938... rest of stderr output deleted ...
3939 10q' conftest.err >conftest.er1
3940 cat conftest.er1 >&5
3941 fi
3942 rm -f conftest.er1 conftest.err
3943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }
3945done
Martin v. Löwis11437992002-04-12 09:54:03 +00003946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003948/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950int
3951main ()
3952{
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003959ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# Try to create an executable without -o first, disregard a.out.
3961# It will help us diagnose broken compilers, and finding out an intuition
3962# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3964$as_echo_n "checking whether the C compiler works... " >&6; }
3965ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3966
3967# The possible output files:
3968ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970ac_rmfiles=
3971for ac_file in $ac_files
3972do
3973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3976 esac
3977done
3978rm -f $ac_rmfiles
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981case "(($ac_try" in
3982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983 *) ac_try_echo=$ac_try;;
3984esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3986$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3992# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3993# in a Makefile. We should not override ac_cv_exeext if it was cached,
3994# so that the user can short-circuit this test for compilers unknown to
3995# Autoconf.
3996for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 ;;
4002 [ab].out )
4003 # We found the default executable, but exeext='' is most
4004 # certainly right.
4005 break;;
4006 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 then :; else
4009 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4010 fi
4011 # We set ac_cv_exeext here because the later test for it is not
4012 # safe: cross compilers may not add the suffix if given an `-o'
4013 # argument, so we may need to know it at that point already.
4014 # Even if this section looks crufty: it has the advantage of
4015 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 break;;
4017 * )
4018 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 esac
4020done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021test "$ac_cv_exeext" = no && ac_cv_exeext=
4022
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004023else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 ac_file=''
4025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004026if test -z "$ac_file"; then :
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4028$as_echo "no" >&6; }
4029$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004034as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004035See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004036else
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4038$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4041$as_echo_n "checking for C compiler default output file name... " >&6; }
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4043$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045
Matthias Kloseb9621712010-04-24 17:59:49 +00004046rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4049$as_echo_n "checking for suffix of executables... " >&6; }
4050if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4062# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4063# work properly (i.e., refer to `conftest.exe'), while it won't with
4064# `rm'.
4065for ac_file in conftest.exe conftest conftest.*; do
4066 test -f "$ac_file" || continue
4067 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4070 break;;
4071 * ) break;;
4072 esac
4073done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004078See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004080rm -f conftest conftest$ac_cv_exeext
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4082$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083
4084rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004085EXEEXT=$ac_cv_exeext
4086ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4088/* end confdefs.h. */
4089#include <stdio.h>
4090int
4091main ()
4092{
4093FILE *f = fopen ("conftest.out", "w");
4094 return ferror (f) || fclose (f) != 0;
4095
4096 ;
4097 return 0;
4098}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004100ac_clean_files="$ac_clean_files conftest.out"
4101# Check that the compiler produces executables we can run. If not, either
4102# the compiler is broken, or we cross compile.
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4104$as_echo_n "checking whether we are cross compiling... " >&6; }
4105if test "$cross_compiling" != yes; then
4106 { { ac_try="$ac_link"
4107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
4111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
4113 (eval "$ac_link") 2>&5
4114 ac_status=$?
4115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }
4117 if { ac_try='./conftest$ac_cv_exeext'
4118 { { case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
4122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
4124 (eval "$ac_try") 2>&5
4125 ac_status=$?
4126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; }; then
4128 cross_compiling=no
4129 else
4130 if test "$cross_compiling" = maybe; then
4131 cross_compiling=yes
4132 else
4133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004136If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004137See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 fi
4139 fi
4140fi
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4142$as_echo "$cross_compiling" >&6; }
4143
4144rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4145ac_clean_files=$ac_clean_files_save
4146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4147$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
4150else
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
4162rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 for ac_file in conftest.o conftest.obj conftest.*; do
4175 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4179 break;;
4180 esac
4181done
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004184sed 's/^/| /' conftest.$ac_ext >&5
4185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004188as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004189See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004191rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4194$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004195OBJEXT=$ac_cv_objext
4196ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4198$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208#ifndef __GNUC__
4209 choke me
4210#endif
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 ac_compiler_gnu=yes
4218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004222ac_cv_c_compiler_gnu=$ac_compiler_gnu
4223
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4226$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4227if test $ac_compiler_gnu = yes; then
4228 GCC=yes
4229else
4230 GCC=
4231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004232ac_test_CFLAGS=${CFLAGS+set}
4233ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4235$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_save_c_werror_flag=$ac_c_werror_flag
4240 ac_c_werror_flag=yes
4241 ac_cv_prog_cc_g=no
4242 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Martin v. Löwis11437992002-04-12 09:54:03 +00004246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 CFLAGS=""
4258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270
Matthias Kloseb9621712010-04-24 17:59:49 +00004271else
4272 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275/* end confdefs.h. */
4276
4277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293 ac_c_werror_flag=$ac_save_c_werror_flag
4294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4296$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299elif test $ac_cv_prog_cc_g = yes; then
4300 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004301 CFLAGS="-g -O2"
4302 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004303 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 fi
4305else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004306 if test "$GCC" = yes; then
4307 CFLAGS="-O2"
4308 else
4309 CFLAGS=
4310 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4313$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004318ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320/* end confdefs.h. */
4321#include <stdarg.h>
4322#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004323struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4325struct buf { int x; };
4326FILE * (*rcsopen) (struct buf *, struct stat *, int);
4327static char *e (p, i)
4328 char **p;
4329 int i;
4330{
4331 return p[i];
4332}
4333static char *f (char * (*g) (char **, int), char **p, ...)
4334{
4335 char *s;
4336 va_list v;
4337 va_start (v,p);
4338 s = g (p, va_arg (v,int));
4339 va_end (v);
4340 return s;
4341}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342
4343/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4344 function prototypes and stuff, but not '\xHH' hex character constants.
4345 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4348 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4353 inside strings and character constants. */
4354#define FOO(x) 'x'
4355int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4356
Skip Montanaro6dead952003-09-25 14:50:04 +00004357int test (int i, double x);
4358struct s1 {int (*f) (int a);};
4359struct s2 {int (*f) (double a);};
4360int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4361int argc;
4362char **argv;
4363int
4364main ()
4365{
4366return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4367 ;
4368 return 0;
4369}
4370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4372 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004373do
4374 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext
4379 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004380done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004382CC=$ac_save_CC
4383
4384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385# AC_CACHE_VAL
4386case "x$ac_cv_prog_cc_c89" in
4387 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4389$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4392$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004393 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4396$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004398if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_ext=c
4403ac_cpp='$CPP $CPPFLAGS'
4404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4406ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004408ac_ext=c
4409ac_cpp='$CPP $CPPFLAGS'
4410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4414$as_echo_n "checking how to run the C preprocessor... " >&6; }
4415# On Suns, sometimes $CPP names a directory.
4416if test -n "$CPP" && test -d "$CPP"; then
4417 CPP=
4418fi
4419if test -z "$CPP"; then
4420 if ${ac_cv_prog_CPP+:} false; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 # Double quotes because CPP needs to be expanded
4424 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4425 do
4426 ac_preproc_ok=false
4427for ac_c_preproc_warn_flag in '' yes
4428do
4429 # Use a header file that comes with gcc, so configuring glibc
4430 # with a fresh cross-compiler works.
4431 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4432 # <limits.h> exists even on freestanding compilers.
4433 # On the NeXT, cc -E runs the code through the compiler's parser,
4434 # not just through cpp. "Syntax error" is here to catch this case.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#ifdef __STDC__
4438# include <limits.h>
4439#else
4440# include <assert.h>
4441#endif
4442 Syntax error
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445
4446else
4447 # Broken: fails on valid input.
4448continue
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452 # OK, works on sane cases. Now check whether nonexistent headers
4453 # can be detected and how.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <ac_nonexistent.h>
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459 # Broken: success on invalid input.
4460continue
4461else
4462 # Passes both tests.
4463ac_preproc_ok=:
4464break
4465fi
4466rm -f conftest.err conftest.i conftest.$ac_ext
4467
4468done
4469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4470rm -f conftest.i conftest.err conftest.$ac_ext
4471if $ac_preproc_ok; then :
4472 break
4473fi
4474
4475 done
4476 ac_cv_prog_CPP=$CPP
4477
4478fi
4479 CPP=$ac_cv_prog_CPP
4480else
4481 ac_cv_prog_CPP=$CPP
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4484$as_echo "$CPP" >&6; }
4485ac_preproc_ok=false
4486for ac_c_preproc_warn_flag in '' yes
4487do
4488 # Use a header file that comes with gcc, so configuring glibc
4489 # with a fresh cross-compiler works.
4490 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4491 # <limits.h> exists even on freestanding compilers.
4492 # On the NeXT, cc -E runs the code through the compiler's parser,
4493 # not just through cpp. "Syntax error" is here to catch this case.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#ifdef __STDC__
4497# include <limits.h>
4498#else
4499# include <assert.h>
4500#endif
4501 Syntax error
4502_ACEOF
4503if ac_fn_c_try_cpp "$LINENO"; then :
4504
4505else
4506 # Broken: fails on valid input.
4507continue
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511 # OK, works on sane cases. Now check whether nonexistent headers
4512 # can be detected and how.
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <ac_nonexistent.h>
4516_ACEOF
4517if ac_fn_c_try_cpp "$LINENO"; then :
4518 # Broken: success on invalid input.
4519continue
4520else
4521 # Passes both tests.
4522ac_preproc_ok=:
4523break
4524fi
4525rm -f conftest.err conftest.i conftest.$ac_ext
4526
4527done
4528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4529rm -f conftest.i conftest.err conftest.$ac_ext
4530if $ac_preproc_ok; then :
4531
4532else
4533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4536See \`config.log' for more details" "$LINENO" 5; }
4537fi
4538
4539ac_ext=c
4540ac_cpp='$CPP $CPPFLAGS'
4541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4543ac_compiler_gnu=$ac_cv_c_compiler_gnu
4544
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4546$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4547if ${ac_cv_path_GREP+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 if test -z "$GREP"; then
4551 ac_path_GREP_found=false
4552 # Loop through the user's path and test for each of PROGNAME-LIST
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_prog in grep ggrep; do
4559 for ac_exec_ext in '' $ac_executable_extensions; do
4560 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4561 as_fn_executable_p "$ac_path_GREP" || continue
4562# Check for GNU ac_path_GREP and select it if it is found.
4563 # Check for GNU $ac_path_GREP
4564case `"$ac_path_GREP" --version 2>&1` in
4565*GNU*)
4566 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4567*)
4568 ac_count=0
4569 $as_echo_n 0123456789 >"conftest.in"
4570 while :
4571 do
4572 cat "conftest.in" "conftest.in" >"conftest.tmp"
4573 mv "conftest.tmp" "conftest.in"
4574 cp "conftest.in" "conftest.nl"
4575 $as_echo 'GREP' >> "conftest.nl"
4576 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578 as_fn_arith $ac_count + 1 && ac_count=$as_val
4579 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4580 # Best one so far, save it but keep looking for a better one
4581 ac_cv_path_GREP="$ac_path_GREP"
4582 ac_path_GREP_max=$ac_count
4583 fi
4584 # 10*(2^10) chars as input seems more than enough
4585 test $ac_count -gt 10 && break
4586 done
4587 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590 $ac_path_GREP_found && break 3
4591 done
4592 done
4593 done
4594IFS=$as_save_IFS
4595 if test -z "$ac_cv_path_GREP"; then
4596 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4597 fi
4598else
4599 ac_cv_path_GREP=$GREP
4600fi
4601
4602fi
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4604$as_echo "$ac_cv_path_GREP" >&6; }
4605 GREP="$ac_cv_path_GREP"
4606
4607
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004608
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
4610
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4612$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004615if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004616 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618 case $withval in
4619 no) with_cxx_main=no
4620 MAINCC='$(CC)';;
4621 yes) with_cxx_main=yes
4622 MAINCC='$(CXX)';;
4623 *) with_cxx_main=yes
4624 MAINCC=$withval
4625 if test -z "$CXX"
4626 then
4627 CXX=$withval
4628 fi;;
4629 esac
4630else
4631
4632 with_cxx_main=no
4633 MAINCC='$(CC)'
4634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635fi
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4638$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
4640preset_cxx="$CXX"
4641if test -z "$CXX"
4642then
4643 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004644 gcc) if test -n "$ac_tool_prefix"; then
4645 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4646set dummy ${ac_tool_prefix}g++; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_CXX+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $CXX in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in notfound
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675CXX=$ac_cv_path_CXX
4676if test -n "$CXX"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4678$as_echo "$CXX" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685fi
4686if test -z "$ac_cv_path_CXX"; then
4687 ac_pt_CXX=$CXX
4688 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692if ${ac_cv_path_ac_pt_CXX+:} false; then :
4693 $as_echo_n "(cached) " >&6
4694else
4695 case $ac_pt_CXX in
4696 [\\/]* | ?:[\\/]*)
4697 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4698 ;;
4699 *)
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in notfound
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
4711done
4712 done
4713IFS=$as_save_IFS
4714
4715 ;;
4716esac
4717fi
4718ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4719if test -n "$ac_pt_CXX"; then
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4721$as_echo "$ac_pt_CXX" >&6; }
4722else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727 if test "x$ac_pt_CXX" = x; then
4728 CXX="g++"
4729 else
4730 case $cross_compiling:$ac_tool_warned in
4731yes:)
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4734ac_tool_warned=yes ;;
4735esac
4736 CXX=$ac_pt_CXX
4737 fi
4738else
4739 CXX="$ac_cv_path_CXX"
4740fi
4741 ;;
4742 cc) if test -n "$ac_tool_prefix"; then
4743 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4744set dummy ${ac_tool_prefix}c++; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 case $CXX in
4751 [\\/]* | ?:[\\/]*)
4752 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4753 ;;
4754 *)
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in notfound
4757do
4758 IFS=$as_save_IFS
4759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764 break 2
4765 fi
4766done
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004768IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 ;;
4771esac
4772fi
4773CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4776$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777else
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004781
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782
4783fi
4784if test -z "$ac_cv_path_CXX"; then
4785 ac_pt_CXX=$CXX
4786 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 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 +00004796 ;;
4797 *)
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in notfound
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 break 2
4808 fi
4809done
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ;;
4814esac
4815fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4817if test -n "$ac_pt_CXX"; then
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4819$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820else
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004824
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 if test "x$ac_pt_CXX" = x; then
4826 CXX="c++"
4827 else
4828 case $cross_compiling:$ac_tool_warned in
4829yes:)
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4832ac_tool_warned=yes ;;
4833esac
4834 CXX=$ac_pt_CXX
4835 fi
4836else
4837 CXX="$ac_cv_path_CXX"
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 clang|*/clang) if test -n "$ac_tool_prefix"; then
4841 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4842set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_CXX+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847else
4848 case $CXX in
4849 [\\/]* | ?:[\\/]*)
4850 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4851 ;;
4852 *)
4853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in notfound
4855do
4856 IFS=$as_save_IFS
4857 test -z "$as_dir" && as_dir=.
4858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004860 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4862 break 2
4863 fi
4864done
4865 done
4866IFS=$as_save_IFS
4867
Ned Deilycbfb9a52012-06-23 16:02:19 -07004868 ;;
4869esac
4870fi
4871CXX=$ac_cv_path_CXX
4872if test -n "$CXX"; then
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4874$as_echo "$CXX" >&6; }
4875else
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880
4881fi
4882if test -z "$ac_cv_path_CXX"; then
4883 ac_pt_CXX=$CXX
4884 # Extract the first word of "clang++", so it can be a program name with args.
4885set dummy clang++; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_ac_pt_CXX+:} false; then :
4889 $as_echo_n "(cached) " >&6
4890else
4891 case $ac_pt_CXX in
4892 [\\/]* | ?:[\\/]*)
4893 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4894 ;;
4895 *)
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in notfound
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
4911 ;;
4912esac
4913fi
4914ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4915if test -n "$ac_pt_CXX"; then
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4917$as_echo "$ac_pt_CXX" >&6; }
4918else
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923 if test "x$ac_pt_CXX" = x; then
4924 CXX="clang++"
4925 else
4926 case $cross_compiling:$ac_tool_warned in
4927yes:)
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4930ac_tool_warned=yes ;;
4931esac
4932 CXX=$ac_pt_CXX
4933 fi
4934else
4935 CXX="$ac_cv_path_CXX"
4936fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004937 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004938 esac
4939 if test "$CXX" = "notfound"
4940 then
4941 CXX=""
4942 fi
4943fi
4944if test -z "$CXX"
4945then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 if test -n "$ac_tool_prefix"; then
4947 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4948 do
4949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004953if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004955else
4956 if test -n "$CXX"; then
4957 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004966 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004972IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004973
4974fi
4975fi
4976CXX=$ac_cv_prog_CXX
4977if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4979$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004983fi
4984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004986 test -n "$CXX" && break
4987 done
4988fi
4989if test -z "$CXX"; then
4990 ac_ct_CXX=$CXX
4991 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4992do
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 if test -n "$ac_ct_CXX"; then
5001 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5002else
5003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
5008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005010 ac_cv_prog_ac_ct_CXX="$ac_prog"
5011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012 break 2
5013 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 done
5016IFS=$as_save_IFS
5017
5018fi
5019fi
5020ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5021if test -n "$ac_ct_CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5023$as_echo "$ac_ct_CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030 test -n "$ac_ct_CXX" && break
5031done
5032
5033 if test "x$ac_ct_CXX" = x; then
5034 CXX="notfound"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 CXX=$ac_ct_CXX
5043 fi
5044fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045
5046 if test "$CXX" = "notfound"
5047 then
5048 CXX=""
5049 fi
5050fi
5051if test "$preset_cxx" != "$CXX"
5052then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005053 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055 By default, distutils will build C++ extension modules with \"$CXX\".
5056 If this is not intended, then set CXX on the configure command line.
5057 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005058$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059
5060 By default, distutils will build C++ extension modules with \"$CXX\".
5061 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005062 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
5065
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005066MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5067
5068
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5070$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5071cat >> conftest.c <<EOF
5072#undef linux
5073#undef i386
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005074#undef powerpc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005075#undef unix
5076#if defined(__linux__)
5077# if defined(__x86_64__) && defined(__LP64__)
5078 x86_64-linux-gnu
5079# elif defined(__x86_64__) && defined(__ILP32__)
5080 x86_64-linux-gnux32
5081# elif defined(__i386__)
5082 i386-linux-gnu
5083# elif defined(__aarch64__) && defined(__AARCH64EL__)
5084# if defined(__ILP32__)
5085 aarch64_ilp32-linux-gnu
5086# else
5087 aarch64-linux-gnu
5088# endif
5089# elif defined(__aarch64__) && defined(__AARCH64EB__)
5090# if defined(__ILP32__)
5091 aarch64_be_ilp32-linux-gnu
5092# else
5093 aarch64_be-linux-gnu
5094# endif
5095# elif defined(__alpha__)
5096 alpha-linux-gnu
5097# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5098# if defined(__ARMEL__)
5099 arm-linux-gnueabihf
5100# else
5101 armeb-linux-gnueabihf
5102# endif
5103# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5104# if defined(__ARMEL__)
5105 arm-linux-gnueabi
5106# else
5107 armeb-linux-gnueabi
5108# endif
5109# elif defined(__hppa__)
5110 hppa-linux-gnu
5111# elif defined(__ia64__)
5112 ia64-linux-gnu
5113# elif defined(__m68k__) && !defined(__mcoldfire__)
5114 m68k-linux-gnu
5115# elif defined(__mips_hard_float) && defined(_MIPSEL)
5116# if _MIPS_SIM == _ABIO32
5117 mipsel-linux-gnu
5118# elif _MIPS_SIM == _ABIN32
5119 mips64el-linux-gnuabin32
5120# elif _MIPS_SIM == _ABI64
5121 mips64el-linux-gnuabi64
5122# else
5123# error unknown platform triplet
5124# endif
5125# elif defined(__mips_hard_float)
5126# if _MIPS_SIM == _ABIO32
5127 mips-linux-gnu
5128# elif _MIPS_SIM == _ABIN32
5129 mips64-linux-gnuabin32
5130# elif _MIPS_SIM == _ABI64
5131 mips64-linux-gnuabi64
5132# else
5133# error unknown platform triplet
5134# endif
5135# elif defined(__or1k__)
5136 or1k-linux-gnu
5137# elif defined(__powerpc__) && defined(__SPE__)
5138 powerpc-linux-gnuspe
5139# elif defined(__powerpc64__)
5140# if defined(__LITTLE_ENDIAN__)
5141 powerpc64le-linux-gnu
5142# else
5143 powerpc64-linux-gnu
5144# endif
5145# elif defined(__powerpc__)
5146 powerpc-linux-gnu
5147# elif defined(__s390x__)
5148 s390x-linux-gnu
5149# elif defined(__s390__)
5150 s390-linux-gnu
5151# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5152 sh4-linux-gnu
5153# elif defined(__sparc__) && defined(__arch64__)
5154 sparc64-linux-gnu
5155# elif defined(__sparc__)
5156 sparc-linux-gnu
5157# else
5158# error unknown platform triplet
5159# endif
5160#elif defined(__FreeBSD_kernel__)
5161# if defined(__LP64__)
5162 x86_64-kfreebsd-gnu
5163# elif defined(__i386__)
5164 i386-kfreebsd-gnu
5165# else
5166# error unknown platform triplet
5167# endif
5168#elif defined(__gnu_hurd__)
5169 i386-gnu
5170#else
5171# error unknown platform triplet
5172#endif
5173
5174EOF
5175
5176if $CPP conftest.c >conftest.out 2>/dev/null; then
5177 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5179$as_echo "$PLATFORM_TRIPLET" >&6; }
5180else
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5182$as_echo "none" >&6; }
5183fi
5184rm -f conftest.c conftest.out
5185
5186if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5187 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5188 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5189 fi
5190fi
5191PLATDIR=plat-$MACHDEP
5192
5193
5194
5195
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5197$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5198save_LDFLAGS="$LDFLAGS"
5199LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005200
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5202/* end confdefs.h. */
5203
5204int
5205main ()
5206{
5207
5208 ;
5209 return 0;
5210}
5211_ACEOF
5212if ac_fn_c_try_link "$LINENO"; then :
5213 NO_AS_NEEDED="-Wl,--no-as-needed"
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5215$as_echo "yes" >&6; }
5216else
5217 NO_AS_NEEDED=""
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5219$as_echo "no" >&6; }
5220fi
5221rm -f core conftest.err conftest.$ac_objext \
5222 conftest$ac_exeext conftest.$ac_ext
5223LDFLAGS="$save_LDFLAGS"
5224
5225
5226
5227# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005228
Matthias Kloseb9621712010-04-24 17:59:49 +00005229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5230$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005231if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005232 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005233else
5234 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5235 then ac_cv_path_EGREP="$GREP -E"
5236 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005237 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005238 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 # Loop through the user's path and test for each of PROGNAME-LIST
5240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005241for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5242do
5243 IFS=$as_save_IFS
5244 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005245 for ac_prog in egrep; do
5246 for ac_exec_ext in '' $ac_executable_extensions; do
5247 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005248 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005249# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005250 # Check for GNU $ac_path_EGREP
5251case `"$ac_path_EGREP" --version 2>&1` in
5252*GNU*)
5253 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5254*)
5255 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005256 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005257 while :
5258 do
5259 cat "conftest.in" "conftest.in" >"conftest.tmp"
5260 mv "conftest.tmp" "conftest.in"
5261 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005262 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005263 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5264 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005265 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005266 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5267 # Best one so far, save it but keep looking for a better one
5268 ac_cv_path_EGREP="$ac_path_EGREP"
5269 ac_path_EGREP_max=$ac_count
5270 fi
5271 # 10*(2^10) chars as input seems more than enough
5272 test $ac_count -gt 10 && break
5273 done
5274 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5275esac
5276
Matthias Kloseb9621712010-04-24 17:59:49 +00005277 $ac_path_EGREP_found && break 3
5278 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005279 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005281IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005283 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 +00005284 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005285else
5286 ac_cv_path_EGREP=$EGREP
5287fi
5288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005289 fi
5290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5292$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005293 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005294
5295
Matthias Kloseb9621712010-04-24 17:59:49 +00005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5297$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005298if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005299 $as_echo_n "(cached) " >&6
5300else
5301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005302/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005303#include <stdlib.h>
5304#include <stdarg.h>
5305#include <string.h>
5306#include <float.h>
5307
5308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_compile "$LINENO"; then :
5317 ac_cv_header_stdc=yes
5318else
5319 ac_cv_header_stdc=no
5320fi
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322
5323if test $ac_cv_header_stdc = yes; then
5324 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326/* end confdefs.h. */
5327#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005328
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005329_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005333else
Matthias Kloseb9621712010-04-24 17:59:49 +00005334 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005335fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005336rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338fi
5339
5340if test $ac_cv_header_stdc = yes; then
5341 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5343/* end confdefs.h. */
5344#include <stdlib.h>
5345
5346_ACEOF
5347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5348 $EGREP "free" >/dev/null 2>&1; then :
5349
5350else
5351 ac_cv_header_stdc=no
5352fi
5353rm -f conftest*
5354
5355fi
5356
5357if test $ac_cv_header_stdc = yes; then
5358 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5359 if test "$cross_compiling" = yes; then :
5360 :
5361else
5362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5363/* end confdefs.h. */
5364#include <ctype.h>
5365#include <stdlib.h>
5366#if ((' ' & 0x0FF) == 0x020)
5367# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5368# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5369#else
5370# define ISLOWER(c) \
5371 (('a' <= (c) && (c) <= 'i') \
5372 || ('j' <= (c) && (c) <= 'r') \
5373 || ('s' <= (c) && (c) <= 'z'))
5374# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5375#endif
5376
5377#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5378int
5379main ()
5380{
5381 int i;
5382 for (i = 0; i < 256; i++)
5383 if (XOR (islower (i), ISLOWER (i))
5384 || toupper (i) != TOUPPER (i))
5385 return 2;
5386 return 0;
5387}
5388_ACEOF
5389if ac_fn_c_try_run "$LINENO"; then :
5390
5391else
5392 ac_cv_header_stdc=no
5393fi
5394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5395 conftest.$ac_objext conftest.beam conftest.$ac_ext
5396fi
5397
5398fi
5399fi
5400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5401$as_echo "$ac_cv_header_stdc" >&6; }
5402if test $ac_cv_header_stdc = yes; then
5403
5404$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5405
5406fi
5407
5408# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5409for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5410 inttypes.h stdint.h unistd.h
5411do :
5412 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5413ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5414"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005415if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 cat >>confdefs.h <<_ACEOF
5417#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5418_ACEOF
5419
5420fi
5421
5422done
5423
5424
5425
5426 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 +02005427if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 MINIX=yes
5429else
5430 MINIX=
5431fi
5432
5433
5434 if test "$MINIX" = yes; then
5435
5436$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5437
5438
5439$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5440
5441
5442$as_echo "#define _MINIX 1" >>confdefs.h
5443
5444 fi
5445
5446
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5448$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005449if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $as_echo_n "(cached) " >&6
5451else
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453/* end confdefs.h. */
5454
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005455# define __EXTENSIONS__ 1
5456 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005457int
5458main ()
5459{
5460
5461 ;
5462 return 0;
5463}
5464_ACEOF
5465if ac_fn_c_try_compile "$LINENO"; then :
5466 ac_cv_safe_to_define___extensions__=yes
5467else
5468 ac_cv_safe_to_define___extensions__=no
5469fi
5470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5471fi
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5473$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5474 test $ac_cv_safe_to_define___extensions__ = yes &&
5475 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5476
5477 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5478
5479 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5480
5481 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5482
5483 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5484
5485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487# Check for unsupported systems
5488case $ac_sys_system/$ac_sys_release in
5489atheos*|Linux*/1*)
5490 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5491 echo See README for details.
5492 exit 1;;
5493esac
5494
5495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5497$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
5499# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005500if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 withval=$with_suffix;
5502 case $withval in
5503 no) EXEEXT=;;
5504 yes) EXEEXT=.exe;;
5505 *) EXEEXT=$withval;;
5506 esac
5507fi
5508
Matthias Kloseb9621712010-04-24 17:59:49 +00005509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5510$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511
5512# Test whether we're running on a non-case-sensitive system, in which
5513# case we give a warning if no ext is given
5514
Matthias Kloseb9621712010-04-24 17:59:49 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5516$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517if test ! -d CaseSensitiveTestDir; then
5518mkdir CaseSensitiveTestDir
5519fi
5520
5521if test -d casesensitivetestdir
5522then
Matthias Kloseb9621712010-04-24 17:59:49 +00005523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5524$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525 BUILDEXEEXT=.exe
5526else
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529 BUILDEXEEXT=$EXEEXT
5530fi
5531rmdir CaseSensitiveTestDir
5532
5533case $MACHDEP in
5534bsdos*)
5535 case $CC in
5536 gcc) CC="$CC -D_HAVE_BSDI";;
5537 esac;;
5538esac
5539
5540case $ac_sys_system in
5541hp*|HP*)
5542 case $CC in
5543 cc|*/cc) CC="$CC -Ae";;
5544 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545esac
5546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547
Matthias Kloseb9621712010-04-24 17:59:49 +00005548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5549$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550if test -z "$LIBRARY"
5551then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005552 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5555$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
5557# LDLIBRARY is the name of the library to link against (as opposed to the
5558# name of the library into which to insert object files). BLDLIBRARY is also
5559# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5560# is blank as the main program is not linked directly against LDLIBRARY.
5561# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5562# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5563# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5564# DLLLIBRARY is the shared (i.e., DLL) library.
5565#
5566# RUNSHARED is used to run shared python without installed libraries
5567#
5568# INSTSONAME is the name of the shared library that will be use to install
5569# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005570#
5571# LDVERSION is the shared library version number, normally the Python version
5572# with the ABI build flags appended.
5573
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574
5575
5576
5577
5578
5579
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581LDLIBRARY="$LIBRARY"
5582BLDLIBRARY='$(LDLIBRARY)'
5583INSTSONAME='$(LDLIBRARY)'
5584DLLLIBRARY=''
5585LDLIBRARYDIR=''
5586RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005587LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588
5589# LINKCC is the command that links the python executable -- default is $(CC).
5590# If CXX is set, and if it is needed to link a main function that was
5591# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5592# python might then depend on the C++ runtime
5593# This is altered for AIX in order to build the export list before
5594# linking.
5595
Matthias Kloseb9621712010-04-24 17:59:49 +00005596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5597$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598if test -z "$LINKCC"
5599then
5600 LINKCC='$(PURIFY) $(MAINCC)'
5601 case $ac_sys_system in
5602 AIX*)
5603 exp_extra="\"\""
5604 if test $ac_sys_release -ge 5 -o \
5605 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5606 exp_extra="."
5607 fi
5608 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 QNX*)
5610 # qcc must be used because the other compilers do not
5611 # support -N.
5612 LINKCC=qcc;;
5613 esac
5614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5616$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
5618# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5619# make sure we default having it set to "no": this is used by
5620# distutils.unixccompiler to know if it should add --enable-new-dtags
5621# to linker command lines, and failing to detect GNU ld simply results
5622# in the same bahaviour as before.
5623
Matthias Kloseb9621712010-04-24 17:59:49 +00005624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5625$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626ac_prog=ld
5627if test "$GCC" = yes; then
5628 ac_prog=`$CC -print-prog-name=ld`
5629fi
5630case `"$ac_prog" -V 2>&1 < /dev/null` in
5631 *GNU*)
5632 GNULD=yes;;
5633 *)
5634 GNULD=no;;
5635esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5637$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5640$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005641if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005642 $as_echo_n "(cached) " >&6
5643else
5644 ac_cv_c_inline=no
5645for ac_kw in inline __inline__ __inline; do
5646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5647/* end confdefs.h. */
5648#ifndef __cplusplus
5649typedef int foo_t;
5650static $ac_kw foo_t static_foo () {return 0; }
5651$ac_kw foo_t foo () {return 0; }
5652#endif
5653
5654_ACEOF
5655if ac_fn_c_try_compile "$LINENO"; then :
5656 ac_cv_c_inline=$ac_kw
5657fi
5658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 test "$ac_cv_c_inline" != no && break
5660done
5661
5662fi
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5664$as_echo "$ac_cv_c_inline" >&6; }
5665
5666case $ac_cv_c_inline in
5667 inline | yes) ;;
5668 *)
5669 case $ac_cv_c_inline in
5670 no) ac_val=;;
5671 *) ac_val=$ac_cv_c_inline;;
5672 esac
5673 cat >>confdefs.h <<_ACEOF
5674#ifndef __cplusplus
5675#define inline $ac_val
5676#endif
5677_ACEOF
5678 ;;
5679esac
5680
5681if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005682
5683$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005684
5685
5686fi
5687
5688
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5690$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005692if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 enableval=$enable_shared;
5694fi
5695
5696
5697if test -z "$enable_shared"
5698then
5699 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005700 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 enable_shared="yes";;
5702 *)
5703 enable_shared="no";;
5704 esac
5705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5707$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5710$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005712if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005713 enableval=$enable_profiling;
5714fi
5715
5716if test "x$enable_profiling" = xyes; then
5717 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005718 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720/* end confdefs.h. */
5721int main() { return 0; }
5722_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005723if ac_fn_c_try_link "$LINENO"; then :
5724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005726 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005728rm -f core conftest.err conftest.$ac_objext \
5729 conftest$ac_exeext conftest.$ac_ext
5730 CC="$ac_save_cc"
5731else
5732 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5735$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
doko@ubuntu.comba015832012-06-30 16:52:05 +02005737if test "x$enable_profiling" = xyes; then
5738 BASECFLAGS="-pg $BASECFLAGS"
5739 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
5741
Matthias Kloseb9621712010-04-24 17:59:49 +00005742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5743$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5746# library that we build, but we do not want to link against it (we
5747# will find it with a -framework option). For this reason there is an
5748# extra variable BLDLIBRARY against which Python and the extension
5749# modules are linked, BLDLIBRARY. This is normally the same as
5750# LDLIBRARY, but empty for MacOSX framework builds.
5751if test "$enable_framework"
5752then
5753 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005754 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 BLDLIBRARY=''
5756else
5757 BLDLIBRARY='$(LDLIBRARY)'
5758fi
5759
5760# Other platforms follow
5761if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005762 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
Matthias Kloseb9621712010-04-24 17:59:49 +00005764$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766 case $ac_sys_system in
5767 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005768 LDLIBRARY='libpython$(LDVERSION).dll.a'
5769 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 ;;
5771 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005772 LDLIBRARY='libpython$(LDVERSION).so'
5773 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005774 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005776 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005777 then
5778 PY3LIBRARY=libpython3.so
5779 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005781 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005782 LDLIBRARY='libpython$(LDVERSION).so'
5783 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005784 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005786 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005787 then
5788 PY3LIBRARY=libpython3.so
5789 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 ;;
5791 hp*|HP*)
5792 case `uname -m` in
5793 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005794 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 ;;
5796 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005797 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798 ;;
5799 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005800 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005801 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005804 LDLIBRARY='libpython$(LDVERSION).dylib'
5805 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005806 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005808 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005809 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005810 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005811 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
5813 esac
5814else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005815 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 case $ac_sys_system in
5817 CYGWIN*)
5818 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005819 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 ;;
5821 esac
5822fi
5823
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005824if test "$cross_compiling" = yes; then
5825 RUNSHARED=
5826fi
5827
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5829$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
5831if test -n "$ac_tool_prefix"; then
5832 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5833set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005836if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005837 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838else
5839 if test -n "$RANLIB"; then
5840 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5841else
5842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843for as_dir in $PATH
5844do
5845 IFS=$as_save_IFS
5846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 break 2
5852 fi
5853done
Matthias Kloseb9621712010-04-24 17:59:49 +00005854 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855IFS=$as_save_IFS
5856
5857fi
5858fi
5859RANLIB=$ac_cv_prog_RANLIB
5860if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5862$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5865$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
5867
5868
5869fi
5870if test -z "$ac_cv_prog_RANLIB"; then
5871 ac_ct_RANLIB=$RANLIB
5872 # Extract the first word of "ranlib", so it can be a program name with args.
5873set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5875$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005876if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
5879 if test -n "$ac_ct_RANLIB"; then
5880 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5881else
5882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5883for as_dir in $PATH
5884do
5885 IFS=$as_save_IFS
5886 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 break 2
5892 fi
5893done
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895IFS=$as_save_IFS
5896
5897fi
5898fi
5899ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5900if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5902$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903else
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906fi
5907
5908 if test "x$ac_ct_RANLIB" = x; then
5909 RANLIB=":"
5910 else
5911 case $cross_compiling:$ac_tool_warned in
5912yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005913{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5914$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915ac_tool_warned=yes ;;
5916esac
5917 RANLIB=$ac_ct_RANLIB
5918 fi
5919else
5920 RANLIB="$ac_cv_prog_RANLIB"
5921fi
5922
5923
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005924if test -n "$ac_tool_prefix"; then
5925 for ac_prog in ar aal
5926 do
5927 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5928set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005931if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005932 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933else
5934 if test -n "$AR"; then
5935 ac_cv_prog_AR="$AR" # Let the user override the test.
5936else
5937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938for as_dir in $PATH
5939do
5940 IFS=$as_save_IFS
5941 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005944 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 break 2
5947 fi
5948done
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950IFS=$as_save_IFS
5951
5952fi
5953fi
5954AR=$ac_cv_prog_AR
5955if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5957$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958else
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961fi
5962
5963
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005964 test -n "$AR" && break
5965 done
5966fi
5967if test -z "$AR"; then
5968 ac_ct_AR=$AR
5969 for ac_prog in ar aal
5970do
5971 # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_prog_ac_ct_AR+:} false; then :
5976 $as_echo_n "(cached) " >&6
5977else
5978 if test -n "$ac_ct_AR"; then
5979 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5980else
5981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
5986 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005988 ac_cv_prog_ac_ct_AR="$ac_prog"
5989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990 break 2
5991 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005993 done
5994IFS=$as_save_IFS
5995
5996fi
5997fi
5998ac_ct_AR=$ac_cv_prog_ac_ct_AR
5999if test -n "$ac_ct_AR"; then
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6001$as_echo "$ac_ct_AR" >&6; }
6002else
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004$as_echo "no" >&6; }
6005fi
6006
6007
6008 test -n "$ac_ct_AR" && break
6009done
6010
6011 if test "x$ac_ct_AR" = x; then
6012 AR="ar"
6013 else
6014 case $cross_compiling:$ac_tool_warned in
6015yes:)
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6018ac_tool_warned=yes ;;
6019esac
6020 AR=$ac_ct_AR
6021 fi
6022fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023
6024
6025# tweak ARFLAGS only if the user didn't set it on the command line
6026
6027if test -z "$ARFLAGS"
6028then
6029 ARFLAGS="rc"
6030fi
6031
doko@ubuntu.com58844492012-06-30 18:25:32 +02006032if test -n "$ac_tool_prefix"; then
6033 for ac_prog in readelf
6034 do
6035 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_prog_READELF+:} false; then :
6040 $as_echo_n "(cached) " >&6
6041else
6042 if test -n "$READELF"; then
6043 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6044else
6045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6046for as_dir in $PATH
6047do
6048 IFS=$as_save_IFS
6049 test -z "$as_dir" && as_dir=.
6050 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006052 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6054 break 2
6055 fi
6056done
6057 done
6058IFS=$as_save_IFS
6059
6060fi
6061fi
6062READELF=$ac_cv_prog_READELF
6063if test -n "$READELF"; then
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6065$as_echo "$READELF" >&6; }
6066else
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069fi
6070
6071
6072 test -n "$READELF" && break
6073 done
6074fi
6075if test -z "$READELF"; then
6076 ac_ct_READELF=$READELF
6077 for ac_prog in readelf
6078do
6079 # Extract the first word of "$ac_prog", so it can be a program name with args.
6080set dummy $ac_prog; ac_word=$2
6081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6082$as_echo_n "checking for $ac_word... " >&6; }
6083if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6084 $as_echo_n "(cached) " >&6
6085else
6086 if test -n "$ac_ct_READELF"; then
6087 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6088else
6089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092 IFS=$as_save_IFS
6093 test -z "$as_dir" && as_dir=.
6094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006096 ac_cv_prog_ac_ct_READELF="$ac_prog"
6097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098 break 2
6099 fi
6100done
6101 done
6102IFS=$as_save_IFS
6103
6104fi
6105fi
6106ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6107if test -n "$ac_ct_READELF"; then
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6109$as_echo "$ac_ct_READELF" >&6; }
6110else
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
6113fi
6114
6115
6116 test -n "$ac_ct_READELF" && break
6117done
6118
6119 if test "x$ac_ct_READELF" = x; then
6120 READELF=":"
6121 else
6122 case $cross_compiling:$ac_tool_warned in
6123yes:)
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6126ac_tool_warned=yes ;;
6127esac
6128 READELF=$ac_ct_READELF
6129 fi
6130fi
6131
6132if test "$cross_compiling" = yes; then
6133 case "$READELF" in
6134 readelf|:)
6135 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6136 ;;
6137 esac
6138fi
6139
6140
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141
Matthias Klosec4c48422012-10-21 23:05:35 +02006142for ac_prog in python$PACKAGE_VERSION python3 python
6143do
6144 # Extract the first word of "$ac_prog", so it can be a program name with args.
6145set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006148if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006149 $as_echo_n "(cached) " >&6
6150else
Matthias Klosec4c48422012-10-21 23:05:35 +02006151 if test -n "$PYTHON"; then
6152 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006153else
6154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6155for as_dir in $PATH
6156do
6157 IFS=$as_save_IFS
6158 test -z "$as_dir" && as_dir=.
6159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006161 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6163 break 2
6164 fi
6165done
6166 done
6167IFS=$as_save_IFS
6168
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006169fi
6170fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006171PYTHON=$ac_cv_prog_PYTHON
6172if test -n "$PYTHON"; then
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6174$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006175else
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177$as_echo "no" >&6; }
6178fi
6179
6180
Matthias Klosec4c48422012-10-21 23:05:35 +02006181 test -n "$PYTHON" && break
6182done
6183test -n "$PYTHON" || PYTHON="not-found"
6184
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006185if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006186 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6187else
6188 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006189fi
6190
6191
Kushal Das02d23a22014-04-15 23:50:06 +05306192for ac_prog in python$PACKAGE_VERSION python3 python
6193do
6194 # Extract the first word of "$ac_prog", so it can be a program name with args.
6195set dummy $ac_prog; ac_word=$2
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
6198if ${ac_cv_prog_PYTHON+:} false; then :
6199 $as_echo_n "(cached) " >&6
6200else
6201 if test -n "$PYTHON"; then
6202 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6203else
6204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207 IFS=$as_save_IFS
6208 test -z "$as_dir" && as_dir=.
6209 for ac_exec_ext in '' $ac_executable_extensions; do
6210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6211 ac_cv_prog_PYTHON="$ac_prog"
6212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213 break 2
6214 fi
6215done
6216 done
6217IFS=$as_save_IFS
6218
6219fi
6220fi
6221PYTHON=$ac_cv_prog_PYTHON
6222if test -n "$PYTHON"; then
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6224$as_echo "$PYTHON" >&6; }
6225else
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
6228fi
6229
6230
6231 test -n "$PYTHON" && break
6232done
6233test -n "$PYTHON" || PYTHON="not-found"
6234
6235if test "$PYTHON" = not-found; then
6236 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6237else
6238 OPCODEHGEN="$PYTHON"
6239fi
6240
6241
6242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243case $MACHDEP in
6244bsdos*|hp*|HP*)
6245 # install -d does not work on BSDI or HP-UX
6246 if test -z "$INSTALL"
6247 then
6248 INSTALL="${srcdir}/install-sh -c"
6249 fi
6250esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251# Find a good install program. We prefer a C program (faster),
6252# so one script is as good as another. But avoid the broken or
6253# incompatible versions:
6254# SysV /etc/install, /usr/sbin/install
6255# SunOS /usr/etc/install
6256# IRIX /sbin/install
6257# AIX /bin/install
6258# AmigaOS /C/install, which installs bootblocks on floppy discs
6259# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6260# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6261# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6262# OS/2's system install, which has a completely different semantic
6263# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006264# Reject install programs that cannot install multiple files.
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6266$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006268if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270else
6271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272for as_dir in $PATH
6273do
6274 IFS=$as_save_IFS
6275 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 # Account for people who put trailing slashes in PATH elements.
6277case $as_dir/ in #((
6278 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 /usr/ucb/* ) ;;
6282 *)
6283 # OSF1 and SCO ODT 3.0 have their own names for install.
6284 # Don't use installbsd from OSF since it installs stuff as root
6285 # by default.
6286 for ac_prog in ginstall scoinst install; do
6287 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006288 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 if test $ac_prog = install &&
6290 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6291 # AIX install. It has an incompatible calling convention.
6292 :
6293 elif test $ac_prog = install &&
6294 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6295 # program-specific install script used by HP pwplus--don't use.
6296 :
6297 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 rm -rf conftest.one conftest.two conftest.dir
6299 echo one > conftest.one
6300 echo two > conftest.two
6301 mkdir conftest.dir
6302 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6303 test -s conftest.one && test -s conftest.two &&
6304 test -s conftest.dir/conftest.one &&
6305 test -s conftest.dir/conftest.two
6306 then
6307 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6308 break 3
6309 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 fi
6311 fi
6312 done
6313 done
6314 ;;
6315esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006316
6317 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318IFS=$as_save_IFS
6319
Matthias Kloseb9621712010-04-24 17:59:49 +00006320rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321
6322fi
6323 if test "${ac_cv_path_install+set}" = set; then
6324 INSTALL=$ac_cv_path_install
6325 else
6326 # As a last resort, use the slow shell script. Don't cache a
6327 # value for INSTALL within a source directory, because that will
6328 # break other packages using the cache if that directory is
6329 # removed, or if the value is a relative name.
6330 INSTALL=$ac_install_sh
6331 fi
6332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6334$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335
6336# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6337# It thinks the first close brace ends the variable substitution.
6338test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6339
6340test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6341
6342test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6343
Matthias Klose93a0ef12012-03-15 18:08:34 +01006344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6345$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6346if test -z "$MKDIR_P"; then
6347 if ${ac_cv_path_mkdir+:} false; then :
6348 $as_echo_n "(cached) " >&6
6349else
6350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6352do
6353 IFS=$as_save_IFS
6354 test -z "$as_dir" && as_dir=.
6355 for ac_prog in mkdir gmkdir; do
6356 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006357 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006358 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6359 'mkdir (GNU coreutils) '* | \
6360 'mkdir (coreutils) '* | \
6361 'mkdir (fileutils) '4.1*)
6362 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6363 break 3;;
6364 esac
6365 done
6366 done
6367 done
6368IFS=$as_save_IFS
6369
6370fi
6371
6372 test -d ./--version && rmdir ./--version
6373 if test "${ac_cv_path_mkdir+set}" = set; then
6374 MKDIR_P="$ac_cv_path_mkdir -p"
6375 else
6376 # As a last resort, use the slow shell script. Don't cache a
6377 # value for MKDIR_P within a source directory, because that will
6378 # break other packages using the cache if that directory is
6379 # removed, or if the value is a relative name.
6380 MKDIR_P="$ac_install_sh -d"
6381 fi
6382fi
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6384$as_echo "$MKDIR_P" >&6; }
6385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387# Not every filesystem supports hard links
6388
6389if test -z "$LN" ; then
6390 case $ac_sys_system in
6391 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006392 *) LN=ln;;
6393 esac
6394fi
6395
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006396# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006397
6398ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6402$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006403
6404# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006405if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406 withval=$with_pydebug;
6407if test "$withval" != no
6408then
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6413$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006415 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418fi
6419else
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422fi
6423
6424
6425# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6426# merged with this chunk of code?
6427
6428# Optimizer/debugger flags
6429# ------------------------
6430# (The following bit of code is complicated enough - please keep things
6431# indented properly. Just pretend you're editing Python code. ;-)
6432
6433# There are two parallel sets of case statements below, one that checks to
6434# see if OPT was set and one that does BASECFLAGS setting based upon
6435# compiler and platform. BASECFLAGS tweaks need to be made even if the
6436# user set OPT.
6437
6438# tweak OPT based on compiler and platform, only if the user didn't set
6439# it on the command line
6440
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006441if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442then
6443 case $GCC in
6444 yes)
6445 if test "$CC" != 'g++' ; then
6446 STRICT_PROTO="-Wstrict-prototypes"
6447 fi
6448 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6449 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6450 WRAP="-fwrapv"
6451 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006452
6453 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006454 case $CC in
6455 *clang*) WRAP="-fwrapv"
6456 ;;
6457 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459 case $ac_cv_prog_cc_g in
6460 yes)
6461 if test "$Py_DEBUG" = 'true' ; then
6462 # Optimization messes up debuggers, so turn it off for
6463 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006464 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6465 OPT="-g -Og -Wall $STRICT_PROTO"
6466 else
6467 OPT="-g -O0 -Wall $STRICT_PROTO"
6468 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469 else
6470 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6471 fi
6472 ;;
6473 *)
6474 OPT="-O3 -Wall $STRICT_PROTO"
6475 ;;
6476 esac
6477 case $ac_sys_system in
6478 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6479 ;;
6480 esac
6481 ;;
6482
6483 *)
6484 OPT="-O"
6485 ;;
6486 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487fi
6488
6489
6490
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006491
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492# The -arch flags for universal builds on OSX
6493UNIVERSAL_ARCH_FLAGS=
6494
6495
6496# tweak BASECFLAGS based on compiler and platform
6497case $GCC in
6498yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006499 # Python doesn't violate C99 aliasing rules, but older versions of
6500 # GCC produce warnings for legal Python code. Enable
6501 # -fno-strict-aliasing on versions of GCC that support but produce
6502 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6504$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505 ac_save_cc="$CC"
6506 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006507 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006508 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006509 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006510else
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006513
Matthias Kloseb159a552010-04-25 21:00:44 +00006514
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006515int
6516main ()
6517{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006518
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006519 ;
6520 return 0;
6521}
Matthias Kloseb159a552010-04-25 21:00:44 +00006522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006524if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006525
6526 CC="$ac_save_cc -fstrict-aliasing"
6527 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006529/* end confdefs.h. */
6530
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006531 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006532int
6533main ()
6534{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006535double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006536 ;
6537 return 0;
6538}
Matthias Kloseb159a552010-04-25 21:00:44 +00006539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006541if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006542
6543 ac_cv_no_strict_aliasing=no
6544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545else
Matthias Kloseb159a552010-04-25 21:00:44 +00006546
6547 ac_cv_no_strict_aliasing=yes
6548
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006549fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006551
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006552else
Matthias Kloseb159a552010-04-25 21:00:44 +00006553
6554 ac_cv_no_strict_aliasing=no
6555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006558fi
6559
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006560 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6563$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006564 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565 then
6566 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6567 fi
6568
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6570$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6571 ac_save_cc="$CC"
6572 CC="$CC -Wunused-result -Werror"
6573 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006574 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006575 $as_echo_n "(cached) " >&6
6576else
6577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6578/* end confdefs.h. */
6579
6580
6581int
6582main ()
6583{
6584
6585 ;
6586 return 0;
6587}
6588
6589_ACEOF
6590if ac_fn_c_try_compile "$LINENO"; then :
6591
6592 ac_cv_disable_unused_result_warning=yes
6593
6594else
6595
6596 ac_cv_disable_unused_result_warning=no
6597
6598fi
6599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6600fi
6601
6602 CFLAGS="$save_CFLAGS"
6603 CC="$ac_save_cc"
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6605$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6606
6607 if test $ac_cv_disable_unused_result_warning = yes
6608 then
6609 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6610 fi
6611
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6613$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6614 ac_save_cc="$CC"
6615 CC="$CC -Werror=declaration-after-statement"
6616 save_CFLAGS="$CFLAGS"
6617 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619else
6620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6621/* end confdefs.h. */
6622
6623
6624int
6625main ()
6626{
6627
6628 ;
6629 return 0;
6630}
6631
6632_ACEOF
6633if ac_fn_c_try_compile "$LINENO"; then :
6634
6635 ac_cv_declaration_after_statement_warning=yes
6636
6637else
6638
6639 ac_cv_declaration_after_statement_warning=no
6640
6641fi
6642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6643fi
6644
6645 CFLAGS="$save_CFLAGS"
6646 CC="$ac_save_cc"
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6648$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6649
6650 if test $ac_cv_declaration_after_statement_warning = yes
6651 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006652 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006653 fi
6654
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6656$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6657 ac_save_cc="$CC"
6658 CC="$CC -Wsign-compare"
6659 save_CFLAGS="$CFLAGS"
6660 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6661 $as_echo_n "(cached) " >&6
6662else
6663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6664/* end confdefs.h. */
6665
6666
6667int
6668main ()
6669{
6670
6671 ;
6672 return 0;
6673}
6674
6675_ACEOF
6676if ac_fn_c_try_compile "$LINENO"; then :
6677
6678 ac_cv_enable_sign_compare_warning=yes
6679
6680else
6681
6682 ac_cv_enable_sign_compare_warning=no
6683
6684fi
6685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6686fi
6687
6688 CFLAGS="$save_CFLAGS"
6689 CC="$ac_save_cc"
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6691$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6692
6693 if test $ac_cv_enable_sign_compare_warning = yes
6694 then
6695 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6696 fi
6697
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6699$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6700 ac_save_cc="$CC"
6701 CC="$CC -Wunreachable-code"
6702 save_CFLAGS="$CFLAGS"
6703 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6704 $as_echo_n "(cached) " >&6
6705else
6706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707/* end confdefs.h. */
6708
6709
6710int
6711main ()
6712{
6713
6714 ;
6715 return 0;
6716}
6717
6718_ACEOF
6719if ac_fn_c_try_compile "$LINENO"; then :
6720
6721 ac_cv_enable_unreachable_code_warning=yes
6722
6723else
6724
6725 ac_cv_enable_unreachable_code_warning=no
6726
6727fi
6728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6729fi
6730
6731 CFLAGS="$save_CFLAGS"
6732 CC="$ac_save_cc"
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6734$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6735
6736 # Don't enable unreachable code warning in debug mode, since it usually
6737 # results in non-standard code paths.
6738 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6739 then
6740 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6741 fi
6742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6744 # support. Without this, treatment of subnormals doesn't follow
6745 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006746 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 alpha*)
6748 BASECFLAGS="$BASECFLAGS -mieee"
6749 ;;
6750 esac
6751
6752 case $ac_sys_system in
6753 SCO_SV*)
6754 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6755 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006756
6757 # is there any other compiler on Darwin besides gcc?
6758 Darwin*)
6759 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6760 # used to be here, but non-Apple gcc doesn't accept them.
6761 if test "${CC}" = gcc
6762 then
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006764$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006765 case "${UNIVERSALSDK}" in
6766 */MacOSX10.4u.sdk)
6767 # Build using 10.4 SDK, force usage of gcc when the
6768 # compiler is gcc, otherwise the user will get very
6769 # confusing error messages when building on OSX 10.6
6770 CC=gcc-4.0
6771 CPP=cpp-4.0
6772 ;;
6773 esac
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006775$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006776 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777
Ned Deily87adb6e2013-10-18 21:09:56 -07006778 if test "${enable_universalsdk}"
6779 then
6780 case "$UNIVERSAL_ARCHS" in
6781 32-bit)
6782 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6783 LIPO_32BIT_FLAGS=""
6784 ARCH_RUN_32BIT=""
6785 ;;
6786 64-bit)
6787 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6788 LIPO_32BIT_FLAGS=""
6789 ARCH_RUN_32BIT="true"
6790 ;;
6791 all)
6792 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6793 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6794 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6795 ;;
6796 intel)
6797 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6798 LIPO_32BIT_FLAGS="-extract i386"
6799 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6800 ;;
6801 intel-32)
6802 UNIVERSAL_ARCH_FLAGS="-arch i386"
6803 LIPO_32BIT_FLAGS=""
6804 ARCH_RUN_32BIT=""
6805 ;;
6806 3-way)
6807 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6808 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6809 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6810 ;;
6811 *)
6812 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6813 ;;
6814 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815
Ned Deily87adb6e2013-10-18 21:09:56 -07006816 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6817 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6818 if test "${UNIVERSALSDK}" != "/"
6819 then
6820 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6821 fi
6822 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823
Ned Deily87adb6e2013-10-18 21:09:56 -07006824 # Calculate an appropriate deployment target for this build:
6825 # The deployment target value is used explicitly to enable certain
6826 # features are enabled (such as builtin libedit support for readline)
6827 # through the use of Apple's Availabiliy Macros and is used as a
6828 # component of the string returned by distutils.get_platform().
6829 #
6830 # Use the value from:
6831 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6832 # 2. the operating system version of the build machine if >= 10.6
6833 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6834 # below to pick either 10.3, 10.4, or 10.5 as the target.
6835 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836
Ned Deily87adb6e2013-10-18 21:09:56 -07006837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6838$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006839 cur_target_major=`sw_vers -productVersion | \
6840 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6841 cur_target_minor=`sw_vers -productVersion | \
6842 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6843 cur_target="${cur_target_major}.${cur_target_minor}"
6844 if test ${cur_target_major} -eq 10 && \
6845 test ${cur_target_minor} -ge 3 && \
6846 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006847 then
Ned Deily36820b62014-06-25 13:44:22 -07006848 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006849 cur_target=10.3
6850 if test ${enable_universalsdk}
6851 then
6852 case "$UNIVERSAL_ARCHS" in
6853 all|3-way|intel|64-bit)
6854 # These configurations were first supported in 10.5
6855 cur_target='10.5'
6856 ;;
6857 esac
6858 else
6859 if test `/usr/bin/arch` = "i386"
6860 then
6861 # 10.4 was the first release to support Intel archs
6862 cur_target="10.4"
6863 fi
6864 fi
6865 fi
6866 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006867
Ned Deily87adb6e2013-10-18 21:09:56 -07006868 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6869 # environment with a value that is the same as what we'll use
6870 # in the Makefile to ensure that we'll get the same compiler
6871 # environment during configure and build time.
6872 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6873 export MACOSX_DEPLOYMENT_TARGET
6874 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6876$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006877
Ned Deily87adb6e2013-10-18 21:09:56 -07006878 # end of Darwin* tests
6879 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880 esac
6881 ;;
6882
6883*)
6884 case $ac_sys_system in
6885 OpenUNIX*|UnixWare*)
6886 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6887 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 SCO_SV*)
6889 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6890 ;;
6891 esac
6892 ;;
6893esac
6894
6895if test "$Py_DEBUG" = 'true'; then
6896 :
6897else
6898 OPT="-DNDEBUG $OPT"
6899fi
6900
6901if test "$ac_arch_flags"
6902then
6903 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6904fi
6905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906# On some compilers, pthreads are available without further options
6907# (e.g. MacOS X). On some of these systems, the compiler will not
6908# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6909# So we have to see first whether pthreads are available without
6910# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6912$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006913if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915else
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917 ac_cv_pthread_is_default=no
6918else
Matthias Kloseb9621712010-04-24 17:59:49 +00006919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920/* end confdefs.h. */
6921
Stefan Krah7dba5942012-11-22 22:49:11 +01006922#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923#include <pthread.h>
6924
6925void* routine(void* p){return NULL;}
6926
6927int main(){
6928 pthread_t p;
6929 if(pthread_create(&p,NULL,routine,NULL)!=0)
6930 return 1;
6931 (void)pthread_detach(p);
6932 return 0;
6933}
6934
6935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937
6938 ac_cv_pthread_is_default=yes
6939 ac_cv_kthread=no
6940 ac_cv_pthread=no
6941
6942else
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947fi
6948
6949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950fi
6951
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6953$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954
6955
6956if test $ac_cv_pthread_is_default = yes
6957then
6958 ac_cv_kpthread=no
6959else
6960# -Kpthread, if available, provides the right #defines
6961# and linker options to make pthread_create available
6962# Some compilers won't report that they do not support -Kpthread,
6963# so we need to run a program to see whether it really made the
6964# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6966$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006967if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969else
6970 ac_save_cc="$CC"
6971CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006972if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973 ac_cv_kpthread=no
6974else
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976/* end confdefs.h. */
6977
Stefan Krah7dba5942012-11-22 22:49:11 +01006978#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979#include <pthread.h>
6980
6981void* routine(void* p){return NULL;}
6982
6983int main(){
6984 pthread_t p;
6985 if(pthread_create(&p,NULL,routine,NULL)!=0)
6986 return 1;
6987 (void)pthread_detach(p);
6988 return 0;
6989}
6990
6991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 ac_cv_kpthread=yes
6994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006999fi
7000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001CC="$ac_save_cc"
7002fi
7003
Matthias Kloseb9621712010-04-24 17:59:49 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7005$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006fi
7007
7008if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7009then
7010# -Kthread, if available, provides the right #defines
7011# and linker options to make pthread_create available
7012# Some compilers won't report that they do not support -Kthread,
7013# so we need to run a program to see whether it really made the
7014# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7016$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007017if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007018 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007019else
7020 ac_save_cc="$CC"
7021CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007022if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007023 ac_cv_kthread=no
7024else
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026/* end confdefs.h. */
7027
Stefan Krah7dba5942012-11-22 22:49:11 +01007028#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007029#include <pthread.h>
7030
7031void* routine(void* p){return NULL;}
7032
7033int main(){
7034 pthread_t p;
7035 if(pthread_create(&p,NULL,routine,NULL)!=0)
7036 return 1;
7037 (void)pthread_detach(p);
7038 return 0;
7039}
7040
7041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007042if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043 ac_cv_kthread=yes
7044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049fi
7050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051CC="$ac_save_cc"
7052fi
7053
Matthias Kloseb9621712010-04-24 17:59:49 +00007054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7055$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056fi
7057
7058if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7059then
7060# -pthread, if available, provides the right #defines
7061# and linker options to make pthread_create available
7062# Some compilers won't report that they do not support -pthread,
7063# so we need to run a program to see whether it really made the
7064# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7066$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007067if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069else
7070 ac_save_cc="$CC"
7071CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007072if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 ac_cv_pthread=no
7074else
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007076/* end confdefs.h. */
7077
Stefan Krah7dba5942012-11-22 22:49:11 +01007078#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079#include <pthread.h>
7080
7081void* routine(void* p){return NULL;}
7082
7083int main(){
7084 pthread_t p;
7085 if(pthread_create(&p,NULL,routine,NULL)!=0)
7086 return 1;
7087 (void)pthread_detach(p);
7088 return 0;
7089}
7090
7091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007092if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007093 ac_cv_pthread=yes
7094else
Matthias Kloseb9621712010-04-24 17:59:49 +00007095 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007099fi
7100
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007101CC="$ac_save_cc"
7102fi
7103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7105$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007106fi
7107
7108# If we have set a CC compiler flag for thread support then
7109# check if it works for CXX, too.
7110ac_cv_cxx_thread=no
7111if test ! -z "$CXX"
7112then
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7114$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115ac_save_cxx="$CXX"
7116
7117if test "$ac_cv_kpthread" = "yes"
7118then
7119 CXX="$CXX -Kpthread"
7120 ac_cv_cxx_thread=yes
7121elif test "$ac_cv_kthread" = "yes"
7122then
7123 CXX="$CXX -Kthread"
7124 ac_cv_cxx_thread=yes
7125elif test "$ac_cv_pthread" = "yes"
7126then
7127 CXX="$CXX -pthread"
7128 ac_cv_cxx_thread=yes
7129fi
7130
7131if test $ac_cv_cxx_thread = yes
7132then
7133 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7134 $CXX -c conftest.$ac_ext 2>&5
7135 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7136 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7137 then
7138 ac_cv_cxx_thread=yes
7139 else
7140 ac_cv_cxx_thread=no
7141 fi
7142 rm -fr conftest*
7143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7145$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146fi
7147CXX="$ac_save_cxx"
7148
7149
7150# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7152$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007153if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007157/* end confdefs.h. */
7158#include <stdlib.h>
7159#include <stdarg.h>
7160#include <string.h>
7161#include <float.h>
7162
7163int
7164main ()
7165{
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007171if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007172 ac_cv_header_stdc=yes
7173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007175fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7177
7178if test $ac_cv_header_stdc = yes; then
7179 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007181/* end confdefs.h. */
7182#include <string.h>
7183
7184_ACEOF
7185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007186 $EGREP "memchr" >/dev/null 2>&1; then :
7187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188else
7189 ac_cv_header_stdc=no
7190fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007191rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192
7193fi
7194
7195if test $ac_cv_header_stdc = yes; then
7196 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198/* end confdefs.h. */
7199#include <stdlib.h>
7200
7201_ACEOF
7202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 $EGREP "free" >/dev/null 2>&1; then :
7204
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007205else
7206 ac_cv_header_stdc=no
7207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007208rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209
7210fi
7211
7212if test $ac_cv_header_stdc = yes; then
7213 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215 :
7216else
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218/* end confdefs.h. */
7219#include <ctype.h>
7220#include <stdlib.h>
7221#if ((' ' & 0x0FF) == 0x020)
7222# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7223# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7224#else
7225# define ISLOWER(c) \
7226 (('a' <= (c) && (c) <= 'i') \
7227 || ('j' <= (c) && (c) <= 'r') \
7228 || ('s' <= (c) && (c) <= 'z'))
7229# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7230#endif
7231
7232#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7233int
7234main ()
7235{
7236 int i;
7237 for (i = 0; i < 256; i++)
7238 if (XOR (islower (i), ISLOWER (i))
7239 || toupper (i) != TOUPPER (i))
7240 return 2;
7241 return 0;
7242}
7243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007244if ac_fn_c_try_run "$LINENO"; then :
7245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251fi
7252
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253fi
7254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7256$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257if test $ac_cv_header_stdc = yes; then
7258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260
7261fi
7262
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007263for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007264fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007265ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007266sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007267unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007268poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007269sys/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 +01007270sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007271sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007272sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007273sys/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 -07007274libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007275bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7276sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007277do :
7278 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7279ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007280if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007282#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007283_ACEOF
7284
7285fi
7286
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287done
7288
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007289ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007290for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7293$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007294if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007296else
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299#include <sys/types.h>
7300#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302int
7303main ()
7304{
7305if ((DIR *) 0)
7306return 0;
7307 ;
7308 return 0;
7309}
7310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007318eval ac_res=\$$as_ac_Header
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7320$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007321if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007323#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007324_ACEOF
7325
7326ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007327fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007329done
7330# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7331if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7333$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007334if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007336else
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007341/* Override any GCC internal prototype to avoid an error.
7342 Use char because int might match the return type of a GCC
7343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007344#ifdef __cplusplus
7345extern "C"
7346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007347char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007348int
7349main ()
7350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007351return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007352 ;
7353 return 0;
7354}
7355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007356for ac_lib in '' dir; do
7357 if test -z "$ac_lib"; then
7358 ac_res="none required"
7359 else
7360 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007361 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007362 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007364 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007366rm -f core conftest.err conftest.$ac_objext \
7367 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007368 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007369 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007371done
Victor Stinnere0be4232011-10-25 13:06:09 +02007372if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007374else
7375 ac_cv_search_opendir=no
7376fi
7377rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007378LIBS=$ac_func_search_save_LIBS
7379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7381$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007382ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007383if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007384 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007386fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007387
Michael W. Hudson54241132001-12-07 15:38:26 +00007388else
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7390$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007393else
7394 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007398/* Override any GCC internal prototype to avoid an error.
7399 Use char because int might match the return type of a GCC
7400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007401#ifdef __cplusplus
7402extern "C"
7403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007404char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007405int
7406main ()
7407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007408return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 ;
7410 return 0;
7411}
7412_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007413for ac_lib in '' x; do
7414 if test -z "$ac_lib"; then
7415 ac_res="none required"
7416 else
7417 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007418 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007419 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007421 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007423rm -f core conftest.err conftest.$ac_objext \
7424 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007425 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007426 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007428done
Victor Stinnere0be4232011-10-25 13:06:09 +02007429if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007431else
7432 ac_cv_search_opendir=no
7433fi
7434rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007435LIBS=$ac_func_search_save_LIBS
7436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7438$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007439ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007440if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007441 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007443fi
7444
7445fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7448$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007449if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007453/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007454#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007455int
7456main ()
7457{
7458return makedev(0, 0);
7459 ;
7460 return 0;
7461}
7462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007464 ac_cv_header_sys_types_h_makedev=yes
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007468rm -f core conftest.err conftest.$ac_objext \
7469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007470
7471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7473$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007474
7475if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007476ac_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 +02007477if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007478
Matthias Kloseb9621712010-04-24 17:59:49 +00007479$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007480
7481fi
7482
7483
7484
7485 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 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 +02007487if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007490
7491fi
7492
7493
7494 fi
7495fi
7496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007498# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7499for ac_header in net/if.h
7500do :
7501 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7502#ifdef STDC_HEADERS
7503# include <stdlib.h>
7504# include <stddef.h>
7505#else
7506# ifdef HAVE_STDLIB_H
7507# include <stdlib.h>
7508# endif
7509#endif
7510#ifdef HAVE_SYS_SOCKET_H
7511# include <sys/socket.h>
7512#endif
7513
7514"
Victor Stinnere0be4232011-10-25 13:06:09 +02007515if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007516 cat >>confdefs.h <<_ACEOF
7517#define HAVE_NET_IF_H 1
7518_ACEOF
7519
7520fi
7521
7522done
7523
7524
Martin v. Löwis11017b12006-01-14 18:12:57 +00007525# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007526for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007527do :
7528 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 +00007529#ifdef HAVE_ASM_TYPES_H
7530#include <asm/types.h>
7531#endif
7532#ifdef HAVE_SYS_SOCKET_H
7533#include <sys/socket.h>
7534#endif
7535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536"
Victor Stinnere0be4232011-10-25 13:06:09 +02007537if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007538 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007540_ACEOF
7541
7542fi
7543
7544done
7545
7546
Charles-François Natali47413c12011-10-06 19:47:44 +02007547# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007548for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007549do :
7550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7552#ifdef HAVE_SYS_SOCKET_H
7553#include <sys/socket.h>
7554#endif
7555
7556"
7557if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7558 cat >>confdefs.h <<_ACEOF
7559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7560_ACEOF
7561
7562fi
7563
7564done
7565
7566
Guido van Rossum627b2d71993-12-24 10:39:16 +00007567# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007568was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7570$as_echo_n "checking for clock_t in time.h... " >&6; }
7571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007572/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007573#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007574
7575_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007578 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007579else
Martin v. Löwis11437992002-04-12 09:54:03 +00007580
7581
Matthias Kloseb9621712010-04-24 17:59:49 +00007582$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007583
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007584
Guido van Rossum627b2d71993-12-24 10:39:16 +00007585fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007586rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7589$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007590
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7592$as_echo_n "checking for makedev... " >&6; }
7593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007594/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007595
Jesus Cea740f53a2010-04-28 11:35:30 +00007596#if defined(MAJOR_IN_MKDEV)
7597#include <sys/mkdev.h>
7598#elif defined(MAJOR_IN_SYSMACROS)
7599#include <sys/sysmacros.h>
7600#else
7601#include <sys/types.h>
7602#endif
7603
Neal Norwitz11690112002-07-30 01:08:28 +00007604int
7605main ()
7606{
Jesus Cea740f53a2010-04-28 11:35:30 +00007607
7608 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007609 ;
7610 return 0;
7611}
Matthias Kloseb159a552010-04-25 21:00:44 +00007612
Neal Norwitz11690112002-07-30 01:08:28 +00007613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007614if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007615 ac_cv_has_makedev=yes
7616else
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619rm -f core conftest.err conftest.$ac_objext \
7620 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7622$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007623if test "$ac_cv_has_makedev" = "yes"; then
7624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007626
7627fi
7628
Christian Heimes985ecdc2013-11-20 11:46:18 +01007629# byte swapping
7630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7631$as_echo_n "checking for le64toh... " >&6; }
7632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7633/* end confdefs.h. */
7634
7635#ifdef HAVE_ENDIAN_H
7636#include <endian.h>
7637#elif defined(HAVE_SYS_ENDIAN_H)
7638#include <sys/endian.h>
7639#endif
7640
7641int
7642main ()
7643{
7644
7645 le64toh(1)
7646 ;
7647 return 0;
7648}
7649
7650_ACEOF
7651if ac_fn_c_try_link "$LINENO"; then :
7652 ac_cv_has_le64toh=yes
7653else
7654 ac_cv_has_le64toh=no
7655fi
7656rm -f core conftest.err conftest.$ac_objext \
7657 conftest$ac_exeext conftest.$ac_ext
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7659$as_echo "$ac_cv_has_le64toh" >&6; }
7660if test "$ac_cv_has_le64toh" = "yes"; then
7661
7662$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7663
7664fi
7665
Martin v. Löwis399a6892002-10-04 10:22:02 +00007666# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7667# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7668# defined, but the compiler does not support pragma redefine_extname,
7669# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7670# structures (such as rlimit64) without declaring them. As a
7671# work-around, disable LFS on such configurations
7672
7673use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7675$as_echo_n "checking Solaris LFS bug... " >&6; }
7676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007677/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007678
7679#define _LARGEFILE_SOURCE 1
7680#define _FILE_OFFSET_BITS 64
7681#include <sys/resource.h>
7682
Martin v. Löwis399a6892002-10-04 10:22:02 +00007683int
7684main ()
7685{
7686struct rlimit foo;
7687 ;
7688 return 0;
7689}
7690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007692 sol_lfs_bug=no
7693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7698$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007699if test "$sol_lfs_bug" = "yes"; then
7700 use_lfs=no
7701fi
7702
7703if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007704# Two defines needed to enable largefile support on various platforms
7705# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007706case $ac_sys_system/$ac_sys_release in
7707AIX*)
7708
7709$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7710
7711 ;;
7712esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007713
Matthias Kloseb9621712010-04-24 17:59:49 +00007714$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
7716
Matthias Kloseb9621712010-04-24 17:59:49 +00007717$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007718
Martin v. Löwis399a6892002-10-04 10:22:02 +00007719fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007720
Guido van Rossum84e7b241996-08-19 21:59:00 +00007721# Add some code to confdefs.h so that the test for off_t works on SCO
7722cat >> confdefs.h <<\EOF
7723#if defined(SCO_DS)
7724#undef _OFF_T
7725#endif
7726EOF
7727
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007729ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007730if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007732else
Martin v. Löwis11437992002-04-12 09:54:03 +00007733
7734cat >>confdefs.h <<_ACEOF
7735#define mode_t int
7736_ACEOF
7737
7738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007741if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007742
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743else
Martin v. Löwis11437992002-04-12 09:54:03 +00007744
7745cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007747_ACEOF
7748
7749fi
7750
Matthias Kloseb9621712010-04-24 17:59:49 +00007751ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007752if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007753
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754else
Martin v. Löwis11437992002-04-12 09:54:03 +00007755
7756cat >>confdefs.h <<_ACEOF
7757#define pid_t int
7758_ACEOF
7759
7760fi
7761
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007764#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766
Matthias Kloseb9621712010-04-24 17:59:49 +00007767ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007769
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007770else
Martin v. Löwis11437992002-04-12 09:54:03 +00007771
7772cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
7775
7776fi
7777
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7779$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007780if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007784/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007786
7787_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790 ac_cv_type_uid_t=yes
7791else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792 ac_cv_type_uid_t=no
7793fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007794rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007795
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7798$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007799if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800
Matthias Kloseb9621712010-04-24 17:59:49 +00007801$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
7803
Matthias Kloseb9621712010-04-24 17:59:49 +00007804$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007805
7806fi
7807
Mark Dickinson983bc162012-12-02 12:11:38 +00007808
7809# There are two separate checks for each of the exact-width integer types we
7810# need. First we check whether the type is available using the usual
7811# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7812# and <stdint.h> where available). We then also use the special type checks of
7813# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7814# directly, #define's uint32_t to be a suitable type.
7815
7816ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7817if test "x$ac_cv_type_uint32_t" = xyes; then :
7818
7819$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7820
7821fi
7822
Matthias Kloseb9621712010-04-24 17:59:49 +00007823ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7824case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007825 no|yes) ;; #(
7826 *)
7827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007829
7830
7831cat >>confdefs.h <<_ACEOF
7832#define uint32_t $ac_cv_c_uint32_t
7833_ACEOF
7834;;
7835 esac
7836
Mark Dickinson983bc162012-12-02 12:11:38 +00007837
7838ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7839if test "x$ac_cv_type_uint64_t" = xyes; then :
7840
7841$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7842
7843fi
7844
Matthias Kloseb9621712010-04-24 17:59:49 +00007845ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7846case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007847 no|yes) ;; #(
7848 *)
7849
Matthias Kloseb9621712010-04-24 17:59:49 +00007850$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007851
7852
7853cat >>confdefs.h <<_ACEOF
7854#define uint64_t $ac_cv_c_uint64_t
7855_ACEOF
7856;;
7857 esac
7858
Mark Dickinson983bc162012-12-02 12:11:38 +00007859
7860ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7861if test "x$ac_cv_type_int32_t" = xyes; then :
7862
7863$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7864
7865fi
7866
Matthias Kloseb9621712010-04-24 17:59:49 +00007867ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7868case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007869 no|yes) ;; #(
7870 *)
7871
7872cat >>confdefs.h <<_ACEOF
7873#define int32_t $ac_cv_c_int32_t
7874_ACEOF
7875;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007876esac
7877
Mark Dickinson983bc162012-12-02 12:11:38 +00007878
7879ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7880if test "x$ac_cv_type_int64_t" = xyes; then :
7881
7882$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7883
7884fi
7885
Matthias Kloseb9621712010-04-24 17:59:49 +00007886ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7887case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007888 no|yes) ;; #(
7889 *)
7890
7891cat >>confdefs.h <<_ACEOF
7892#define int64_t $ac_cv_c_int64_t
7893_ACEOF
7894;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007895esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007896
Mark Dickinson983bc162012-12-02 12:11:38 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007899if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900
Matthias Kloseb9621712010-04-24 17:59:49 +00007901$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007902
7903fi
7904
Stefan Krah1919b7e2012-03-21 18:25:23 +01007905ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7906if test "x$ac_cv_type___uint128_t" = xyes; then :
7907
7908$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7909
7910fi
7911
Jack Jansendd19cf82001-12-06 22:36:17 +00007912
Michael W. Hudson54241132001-12-07 15:38:26 +00007913# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007914# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915# The cast to long int works around a bug in the HP C Compiler
7916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7920$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007921if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007923else
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 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 +00007925
Martin v. Löwis11437992002-04-12 09:54:03 +00007926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 if test "$ac_cv_type_int" = yes; then
7928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007930as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007931See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932 else
7933 ac_cv_sizeof_int=0
7934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936
Martin v. Löwis11437992002-04-12 09:54:03 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7939$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940
7941
7942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007944#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007945_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007946
7947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948# The cast to long int works around a bug in the HP C Compiler
7949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7951# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7953$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007954if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007956else
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 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 +00007958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959else
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if test "$ac_cv_type_long" = yes; then
7961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007963as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007964See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 else
7966 ac_cv_sizeof_long=0
7967 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7972$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973
7974
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007977#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007978_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007979
7980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981# The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7986$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 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 +00007991
Martin v. Löwis11437992002-04-12 09:54:03 +00007992else
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 if test "$ac_cv_type_void_p" = yes; then
7994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007996as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007997See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 else
7999 ac_cv_sizeof_void_p=0
8000 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8005$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006
8007
8008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008010#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008011_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008012
8013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014# The cast to long int works around a bug in the HP C Compiler
8015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8017# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8019$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008020if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008022else
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 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 +00008024
Martin v. Löwis11437992002-04-12 09:54:03 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 if test "$ac_cv_type_short" = yes; then
8027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008029as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008030See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031 else
8032 ac_cv_sizeof_short=0
8033 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008035
Martin v. Löwis11437992002-04-12 09:54:03 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8038$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039
8040
8041
Martin v. Löwis11437992002-04-12 09:54:03 +00008042cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008043#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008044_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008045
8046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047# The cast to long int works around a bug in the HP C Compiler
8048# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8049# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8050# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8052$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008053if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008055else
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 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 +00008057
Martin v. Löwis11437992002-04-12 09:54:03 +00008058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 if test "$ac_cv_type_float" = yes; then
8060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008062as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008063See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 else
8065 ac_cv_sizeof_float=0
8066 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068
Martin v. Löwis11437992002-04-12 09:54:03 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8071$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072
8073
8074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008076#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008077_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008078
8079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080# The cast to long int works around a bug in the HP C Compiler
8081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8083# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8085$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 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 +00008090
Martin v. Löwis11437992002-04-12 09:54:03 +00008091else
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 if test "$ac_cv_type_double" = yes; then
8093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008095as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008096See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 else
8098 ac_cv_sizeof_double=0
8099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101
Martin v. Löwis11437992002-04-12 09:54:03 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8104$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105
8106
8107
Martin v. Löwis11437992002-04-12 09:54:03 +00008108cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008109#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008110_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008111
8112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113# The cast to long int works around a bug in the HP C Compiler
8114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8118$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 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 +00008123
Martin v. Löwis11437992002-04-12 09:54:03 +00008124else
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 if test "$ac_cv_type_fpos_t" = yes; then
8126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008128as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008129See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130 else
8131 ac_cv_sizeof_fpos_t=0
8132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008134
Martin v. Löwis11437992002-04-12 09:54:03 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8137$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138
8139
8140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008142#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008143_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008144
Michael W. Hudson54241132001-12-07 15:38:26 +00008145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146# The cast to long int works around a bug in the HP C Compiler
8147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8149# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8151$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008152if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 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 +00008156
Martin v. Löwis18e16552006-02-15 17:27:45 +00008157else
Matthias Kloseb9621712010-04-24 17:59:49 +00008158 if test "$ac_cv_type_size_t" = yes; then
8159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008161as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008162See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 else
8164 ac_cv_sizeof_size_t=0
8165 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167
Martin v. Löwis18e16552006-02-15 17:27:45 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8170$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171
8172
8173
Martin v. Löwis18e16552006-02-15 17:27:45 +00008174cat >>confdefs.h <<_ACEOF
8175#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8176_ACEOF
8177
8178
Christian Heimes400adb02008-02-01 08:12:03 +00008179# The cast to long int works around a bug in the HP C Compiler
8180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8182# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8184$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008185if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008187else
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 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 +00008189
Christian Heimes400adb02008-02-01 08:12:03 +00008190else
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 if test "$ac_cv_type_pid_t" = yes; then
8192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008194as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008195See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008196 else
8197 ac_cv_sizeof_pid_t=0
8198 fi
8199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200
Christian Heimes400adb02008-02-01 08:12:03 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8203$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008204
8205
8206
8207cat >>confdefs.h <<_ACEOF
8208#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8209_ACEOF
8210
8211
Michael W. Hudson54241132001-12-07 15:38:26 +00008212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8214$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008215have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008218
Martin v. Löwis11437992002-04-12 09:54:03 +00008219int
8220main ()
8221{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008222long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ;
8224 return 0;
8225}
8226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008232 have_long_long=yes
8233
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8237$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008238if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# The cast to long int works around a bug in the HP C Compiler
8240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8244$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 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 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 if test "$ac_cv_type_long_long" = yes; then
8252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008255See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_long_long=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8263$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264
8265
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008268#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008270
Michael W. Hudson54241132001-12-07 15:38:26 +00008271
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008272fi
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8275$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008276have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008278/* end confdefs.h. */
8279
8280int
8281main ()
8282{
8283long double x; x = (long double)0;
8284 ;
8285 return 0;
8286}
8287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008288if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008289
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008292
8293 have_long_double=yes
8294
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008295fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8298$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008299if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008300# The cast to long int works around a bug in the HP C Compiler
8301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8303# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8305$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008306if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008308else
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 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 +00008310
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 if test "$ac_cv_type_long_double" = yes; then
8313 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008315as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008316See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008317 else
8318 ac_cv_sizeof_long_double=0
8319 fi
8320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8324$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008325
8326
8327
8328cat >>confdefs.h <<_ACEOF
8329#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8330_ACEOF
8331
8332
8333fi
8334
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8337$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008338have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008340/* end confdefs.h. */
8341
8342int
8343main ()
8344{
8345_Bool x; x = (_Bool)0;
8346 ;
8347 return 0;
8348}
8349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008350if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008351
8352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008354
8355 have_c99_bool=yes
8356
Thomas Woutersb2137042007-02-01 18:02:27 +00008357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8360$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008361if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362# The cast to long int works around a bug in the HP C Compiler
8363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8365# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8367$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 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 +00008372
Thomas Woutersb2137042007-02-01 18:02:27 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 if test "$ac_cv_type__Bool" = yes; then
8375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008377as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008378See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379 else
8380 ac_cv_sizeof__Bool=0
8381 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383
Thomas Woutersb2137042007-02-01 18:02:27 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8386$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387
8388
8389
Thomas Woutersb2137042007-02-01 18:02:27 +00008390cat >>confdefs.h <<_ACEOF
8391#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8392_ACEOF
8393
8394
8395fi
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008398 #include <stdint.h>
8399 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008400 #ifdef HAVE_INTTYPES_H
8401 #include <inttypes.h>
8402 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008403"
Victor Stinnere0be4232011-10-25 13:06:09 +02008404if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008405
8406cat >>confdefs.h <<_ACEOF
8407#define HAVE_UINTPTR_T 1
8408_ACEOF
8409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8415$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 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 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 if test "$ac_cv_type_uintptr_t" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008426See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 else
8428 ac_cv_sizeof_uintptr_t=0
8429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8434$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435
8436
8437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008439#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008441
Michael W. Hudson54241132001-12-07 15:38:26 +00008442
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008443fi
8444
Thomas Wouters89f507f2006-12-13 04:49:30 +00008445
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008446# The cast to long int works around a bug in the HP C Compiler
8447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8449# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8451$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008456#ifdef HAVE_SYS_TYPES_H
8457#include <sys/types.h>
8458#endif
8459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 if test "$ac_cv_type_off_t" = yes; then
8464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008466as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008467See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008468 else
8469 ac_cv_sizeof_off_t=0
8470 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8475$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008477
8478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008480#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008481_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008482
Michael W. Hudson54241132001-12-07 15:38:26 +00008483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8486$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008487if test "$have_long_long" = yes
8488then
8489if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008490 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8495$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008499fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8502$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008503fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008504
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008505# The cast to long int works around a bug in the HP C Compiler
8506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8508# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8510$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008511if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008513else
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008515#ifdef HAVE_SYS_TYPES_H
8516#include <sys/types.h>
8517#endif
8518#ifdef HAVE_TIME_H
8519#include <time.h>
8520#endif
8521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008523
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_time_t" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008530 else
8531 ac_cv_sizeof_time_t=0
8532 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8537$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008542#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008544
Michael W. Hudson54241132001-12-07 15:38:26 +00008545
8546
Trent Mick635f6fb2000-08-23 21:33:05 +00008547# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008548ac_save_cc="$CC"
8549if test "$ac_cv_kpthread" = "yes"
8550then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008551elif test "$ac_cv_kthread" = "yes"
8552then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008553elif test "$ac_cv_pthread" = "yes"
8554then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008555fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008556
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8558$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008559have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008561/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008562
8563 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008564int
8565main ()
8566{
Guido van Rossum12580492000-09-24 16:47:19 +00008567pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ;
8569 return 0;
8570}
Matthias Kloseb159a552010-04-25 21:00:44 +00008571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008573if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008574 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8578$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008579if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8583# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8585$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008586if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008590#ifdef HAVE_PTHREAD_H
8591#include <pthread.h>
8592#endif
8593
Matthias Kloseb9621712010-04-24 17:59:49 +00008594"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008595
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 if test "$ac_cv_type_pthread_t" = yes; then
8598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008600as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008601See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008602 else
8603 ac_cv_sizeof_pthread_t=0
8604 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606
Trent Mick635f6fb2000-08-23 21:33:05 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8609$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008611
8612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008614#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008616
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008617
Trent Mick635f6fb2000-08-23 21:33:05 +00008618fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008619CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008622case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008623 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008624 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8625 ;;
8626 Darwin/*)
8627 OTHER_LIBTOOL_OPT=""
8628 ;;
8629esac
8630
8631
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008632
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008633case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008634 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008635 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8636 if test "${enable_universalsdk}"; then
8637 :
8638 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008639 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008640 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008641 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008643 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008644 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008645 if test ${gcc_version} '<' 4.0
8646 then
8647 LIBTOOL_CRUFT="-lcc_dynamic"
8648 else
8649 LIBTOOL_CRUFT=""
8650 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008652 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008655/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008656
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008657 #include <unistd.h>
8658 int main(int argc, char*argv[])
8659 {
8660 if (sizeof(long) == 4) {
8661 return 0;
8662 } else {
8663 return 1;
8664 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008665 }
8666
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008668if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008669 ac_osx_32bit=yes
8670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008675fi
8676
8677
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008678 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008679 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008680 i386)
8681 MACOSX_DEFAULT_ARCH="i386"
8682 ;;
8683 ppc)
8684 MACOSX_DEFAULT_ARCH="ppc"
8685 ;;
8686 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008687 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008688 ;;
8689 esac
8690 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008691 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008692 i386)
8693 MACOSX_DEFAULT_ARCH="x86_64"
8694 ;;
8695 ppc)
8696 MACOSX_DEFAULT_ARCH="ppc64"
8697 ;;
8698 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008700 ;;
8701 esac
8702
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008703 fi
8704
8705 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008706 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008707 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008708esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8710$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008711if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008712then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008713 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008715 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008716
Matthias Kloseb9621712010-04-24 17:59:49 +00008717$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8720$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008721 if test $enable_shared = "yes"
8722 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008723 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 +00008724 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008728fi
8729
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8731$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008732case $ac_sys_system/$ac_sys_release in
8733 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008734
Matthias Kloseb9621712010-04-24 17:59:49 +00008735$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8738$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008739 ;;
8740 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008743 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008744esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008745
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008747
Michael W. Hudson54241132001-12-07 15:38:26 +00008748
8749
8750
8751
Benjamin Peterson99f03762010-04-11 22:15:28 +00008752
Thomas Wouters477c8d52006-05-27 19:21:47 +00008753
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008754# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8755# -- usually .so, .sl on HP-UX, .dll on Cygwin
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8757$as_echo_n "checking the extension of shared libraries... " >&6; }
8758if test -z "$SHLIB_SUFFIX"; then
8759 case $ac_sys_system in
8760 hp*|HP*)
8761 case `uname -m` in
8762 ia64) SHLIB_SUFFIX=.so;;
8763 *) SHLIB_SUFFIX=.sl;;
8764 esac
8765 ;;
8766 CYGWIN*) SHLIB_SUFFIX=.dll;;
8767 *) SHLIB_SUFFIX=.so;;
8768 esac
8769fi
8770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8771$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008772
Guido van Rossum0a516c91994-09-12 10:58:40 +00008773# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008774# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008775# (Shared libraries in this instance are shared modules to be loaded into
8776# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8778$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008779if test -z "$LDSHARED"
8780then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008781 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008782 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008783 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008784 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008785 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008786 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008787 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008789 if test "$GCC" = "yes" ; then
8790 LDSHARED='$(CC) -shared'
8791 LDCXXSHARED='$(CXX) -shared'
8792 else
8793 LDSHARED='$(CC) -G'
8794 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008795 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008796 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008797 if test "$GCC" = "yes" ; then
8798 LDSHARED='$(CC) -shared'
8799 LDCXXSHARED='$(CXX) -shared'
8800 else
8801 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008802 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008803 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008804 LDSHARED='$(CC) -bundle'
8805 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008806 if test "$enable_framework" ; then
8807 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008808 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8809 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008810 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008811 else
8812 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008813 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008814 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008815 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008816 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008817 LDSHARED='$(CC) -bundle'
8818 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008819 if test "$enable_framework" ; then
8820 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008821 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8822 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008823 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008824 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008825 # No framework, use the Python app as bundle-loader
8826 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008827 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008828 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008829 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008830 Darwin/*)
8831 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8832 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008833
Ned Deily36820b62014-06-25 13:44:22 -07008834 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8835 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8836 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8837 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8838 if test ${dep_target_major} -eq 10 && \
8839 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008840 then
Ned Deily36820b62014-06-25 13:44:22 -07008841 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008842 LDSHARED='$(CC) -bundle'
8843 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008844 if test "$enable_framework" ; then
8845 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008846 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8847 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008848 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008849 else
8850 # No framework, use the Python app as bundle-loader
8851 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8852 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008853 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008854 fi
Ned Deily36820b62014-06-25 13:44:22 -07008855 else
8856 # building for OS X 10.3 and later
8857 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8858 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8859 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008860 fi
8861 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008862 Linux*|GNU*|QNX*)
8863 LDSHARED='$(CC) -shared'
8864 LDCXXSHARED='$(CXX) -shared';;
8865 BSD/OS*/4*)
8866 LDSHARED="gcc -shared"
8867 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008868 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008869 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008870 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008871 LDSHARED='$(CC) -shared'
8872 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008873 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008874 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008875 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008876 OpenBSD*)
8877 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8878 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008879 LDSHARED='$(CC) -shared $(CCSHARED)'
8880 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008881 else
8882 case `uname -r` in
8883 [01].* | 2.[0-7] | 2.[0-7].*)
8884 LDSHARED="ld -Bshareable ${LDFLAGS}"
8885 ;;
8886 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008887 LDSHARED='$(CC) -shared $(CCSHARED)'
8888 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008889 ;;
8890 esac
8891 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008892 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008893 LDSHARED='$(CC) -shared'
8894 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008895 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008896 if test "$GCC" = "yes" ; then
8897 LDSHARED='$(CC) -shared'
8898 LDCXXSHARED='$(CXX) -shared'
8899 else
8900 LDSHARED='$(CC) -G'
8901 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008902 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008903 SCO_SV*)
8904 LDSHARED='$(CC) -Wl,-G,-Bexport'
8905 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8906 CYGWIN*)
8907 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8908 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008909 *) LDSHARED="ld";;
8910 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8913$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008914LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008915BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008916# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008917# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8919$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008920if test -z "$CCSHARED"
8921then
Guido van Rossum07397971997-04-29 21:49:50 +00008922 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008923 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008924 then CCSHARED="-fPIC";
8925 elif test `uname -p` = sparc;
8926 then CCSHARED="-xcode=pic32";
8927 else CCSHARED="-Kpic";
8928 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008929 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008930 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008931 else CCSHARED="+z";
8932 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008933 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008934 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008935 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008936 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008937 if test "$GCC" = "yes"
8938 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008939 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008940 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008941 SCO_SV*)
8942 if test "$GCC" = "yes"
8943 then CCSHARED="-fPIC"
8944 else CCSHARED="-Kpic -belf"
8945 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008946 IRIX*/6*) case $CC in
8947 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008948 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008949 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008950 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8953$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008954# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008955# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8957$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008958if test -z "$LINKFORSHARED"
8959then
Guido van Rossum07397971997-04-29 21:49:50 +00008960 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008961 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008962 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008963 LINKFORSHARED="-Wl,-E -Wl,+s";;
8964# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008965 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008966 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008967 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008969 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008970
8971 # Issue #18075: the default maximum stack size (8MBytes) is too
8972 # small for the default recursion limit. Increase the stack size
8973 # to ensure that tests don't crash
8974 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8975
Jack Jansene578a632001-08-15 01:27:14 +00008976 if test "$enable_framework"
8977 then
Jack Jansenda49e192005-01-07 13:08:22 +00008978 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008979 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008980 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008981 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008982 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008983 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008984 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008985 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8986 then
8987 LINKFORSHARED="-Wl,--export-dynamic"
8988 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008989 SunOS/5*) case $CC in
8990 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008991 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008992 then
8993 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008994 fi;;
8995 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008996 CYGWIN*)
8997 if test $enable_shared = "no"
8998 then
8999 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9000 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009001 QNX*)
9002 # -Wl,-E causes the symbols to be added to the dynamic
9003 # symbol table so that they can be found when a module
9004 # is loaded. -N 2048K causes the stack size to be set
9005 # to 2048 kilobytes so that the stack doesn't overflow
9006 # when running test_compile.py.
9007 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009008 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9011$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009012
Michael W. Hudson54241132001-12-07 15:38:26 +00009013
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9016$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009017if test ! "$LIBRARY" = "$LDLIBRARY"
9018then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009019 case $ac_sys_system in
9020 CYGWIN*)
9021 # Cygwin needs CCSHARED when building extension DLLs
9022 # but not when building the interpreter DLL.
9023 CFLAGSFORSHARED='';;
9024 *)
9025 CFLAGSFORSHARED='$(CCSHARED)'
9026 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9029$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009030
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009031# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9032# library (with --enable-shared).
9033# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009034# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9035# if it is not required, since it creates a dependency of the shared library
9036# to LIBS. This, in turn, means that applications linking the shared libpython
9037# don't need to link LIBS explicitly. The default should be only changed
9038# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009039
Matthias Kloseb9621712010-04-24 17:59:49 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9041$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009042case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009043 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009044 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009045esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9047$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009048
9049
Guido van Rossum627b2d71993-12-24 10:39:16 +00009050# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9052$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009053if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009054 $as_echo_n "(cached) " >&6
9055else
9056 ac_check_lib_save_LIBS=$LIBS
9057LIBS="-lsendfile $LIBS"
9058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9059/* end confdefs.h. */
9060
9061/* Override any GCC internal prototype to avoid an error.
9062 Use char because int might match the return type of a GCC
9063 builtin and then its argument prototype would still apply. */
9064#ifdef __cplusplus
9065extern "C"
9066#endif
9067char sendfile ();
9068int
9069main ()
9070{
9071return sendfile ();
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076if ac_fn_c_try_link "$LINENO"; then :
9077 ac_cv_lib_sendfile_sendfile=yes
9078else
9079 ac_cv_lib_sendfile_sendfile=no
9080fi
9081rm -f core conftest.err conftest.$ac_objext \
9082 conftest$ac_exeext conftest.$ac_ext
9083LIBS=$ac_check_lib_save_LIBS
9084fi
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9086$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009087if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009088 cat >>confdefs.h <<_ACEOF
9089#define HAVE_LIBSENDFILE 1
9090_ACEOF
9091
9092 LIBS="-lsendfile $LIBS"
9093
9094fi
9095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9097$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009098if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009100else
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009102LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106/* Override any GCC internal prototype to avoid an error.
9107 Use char because int might match the return type of a GCC
9108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009109#ifdef __cplusplus
9110extern "C"
9111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009112char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 ;
9118 return 0;
9119}
9120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009123else
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009126rm -f core conftest.err conftest.$ac_objext \
9127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009128LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9131$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009132if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 cat >>confdefs.h <<_ACEOF
9134#define HAVE_LIBDL 1
9135_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009136
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009137 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009139fi
9140 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9142$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009143if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009145else
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009147LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151/* Override any GCC internal prototype to avoid an error.
9152 Use char because int might match the return type of a GCC
9153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009154#ifdef __cplusplus
9155extern "C"
9156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009157char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009158int
9159main ()
9160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ;
9163 return 0;
9164}
9165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009166if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009168else
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171rm -f core conftest.err conftest.$ac_objext \
9172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009173LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9176$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009177if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 cat >>confdefs.h <<_ACEOF
9179#define HAVE_LIBDLD 1
9180_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009181
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009182 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009183
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009184fi
9185 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9187$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9188if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9189 $as_echo_n "(cached) " >&6
9190else
9191 ac_check_lib_save_LIBS=$LIBS
9192LIBS="-lcrypto $LIBS"
9193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9194/* end confdefs.h. */
9195
9196/* Override any GCC internal prototype to avoid an error.
9197 Use char because int might match the return type of a GCC
9198 builtin and then its argument prototype would still apply. */
9199#ifdef __cplusplus
9200extern "C"
9201#endif
9202char RAND_egd ();
9203int
9204main ()
9205{
9206return RAND_egd ();
9207 ;
9208 return 0;
9209}
9210_ACEOF
9211if ac_fn_c_try_link "$LINENO"; then :
9212 ac_cv_lib_crypto_RAND_egd=yes
9213else
9214 ac_cv_lib_crypto_RAND_egd=no
9215fi
9216rm -f core conftest.err conftest.$ac_objext \
9217 conftest$ac_exeext conftest.$ac_ext
9218LIBS=$ac_check_lib_save_LIBS
9219fi
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9221$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9222if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9223
9224$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9225
9226fi
9227
Martin v. Löwis519adae2003-09-20 10:47:47 +00009228
Georg Brandlb1441c72009-01-03 22:33:39 +00009229# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009230if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9232$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009233if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009235else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009236 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240/* Override any GCC internal prototype to avoid an error.
9241 Use char because int might match the return type of a GCC
9242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009243#ifdef __cplusplus
9244extern "C"
9245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009246char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009247int
9248main ()
9249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 ;
9252 return 0;
9253}
9254_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255for ac_lib in '' pthread rt posix4; do
9256 if test -z "$ac_lib"; then
9257 ac_res="none required"
9258 else
9259 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265rm -f core conftest.err conftest.$ac_objext \
9266 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009267 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270done
Victor Stinnere0be4232011-10-25 13:06:09 +02009271if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273else
9274 ac_cv_search_sem_init=no
9275fi
9276rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009277LIBS=$ac_func_search_save_LIBS
9278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9280$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009282if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009284
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009285fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009286 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009287 # posix4 on Solaris 2.6
9288 # pthread (first!) on Linux
9289fi
9290
Martin v. Löwis19d17342003-06-14 21:03:05 +00009291# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9293$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009294if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009296else
9297 ac_check_lib_save_LIBS=$LIBS
9298LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302/* Override any GCC internal prototype to avoid an error.
9303 Use char because int might match the return type of a GCC
9304 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009305#ifdef __cplusplus
9306extern "C"
9307#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009308char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009309int
9310main ()
9311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009313 ;
9314 return 0;
9315}
9316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009318 ac_cv_lib_intl_textdomain=yes
9319else
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009322rm -f core conftest.err conftest.$ac_objext \
9323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009324LIBS=$ac_check_lib_save_LIBS
9325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9327$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009328if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009331
Brett Cannonc6d936e2009-06-07 20:09:53 +00009332 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333fi
9334
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009335
9336# checks for system dependent C++ extensions support
9337case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9339$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009342
Georg Brandl59e87bd2011-02-15 19:48:59 +00009343 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009347loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ;
9349 return 0;
9350}
Matthias Kloseb159a552010-04-25 21:00:44 +00009351
Martin v. Löwis11437992002-04-12 09:54:03 +00009352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009353if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009354
Matthias Kloseb159a552010-04-25 21:00:44 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009357
Matthias Kloseb159a552010-04-25 21:00:44 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009360
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009361else
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009364$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009365
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009367rm -f core conftest.err conftest.$ac_objext \
9368 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009369 *) ;;
9370esac
9371
Christian Heimes985ecdc2013-11-20 11:46:18 +01009372# check for systems that require aligned memory access
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9374$as_echo_n "checking aligned memory access is required... " >&6; }
9375if test "$cross_compiling" = yes; then :
9376 aligned_required=yes
9377else
9378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9379/* end confdefs.h. */
9380
9381int main()
9382{
9383 char s[16];
9384 int i, *p1, *p2;
9385 for (i=0; i < 16; i++)
9386 s[i] = i;
9387 p1 = (int*)(s+1);
9388 p2 = (int*)(s+2);
9389 if (*p1 == *p2)
9390 return 1;
9391 return 0;
9392}
9393
9394_ACEOF
9395if ac_fn_c_try_run "$LINENO"; then :
9396 aligned_required=no
9397else
9398 aligned_required=yes
9399fi
9400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9401 conftest.$ac_objext conftest.beam conftest.$ac_ext
9402fi
9403
9404
9405if test "$aligned_required" = yes ; then
9406
9407$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9408
9409fi
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9411$as_echo "$aligned_required" >&6; }
9412
9413
9414# str, bytes and memoryview hash algorithm
9415
9416
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9418$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9419
9420# Check whether --with-hash_algorithm was given.
9421if test "${with_hash_algorithm+set}" = set; then :
9422 withval=$with_hash_algorithm;
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9424$as_echo "$withval" >&6; }
9425case "$withval" in
9426 siphash24)
9427 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9428
9429 ;;
9430 fnv)
9431 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9432
9433 ;;
9434 *)
9435 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9436 ;;
9437esac
9438
9439else
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9441$as_echo "default" >&6; }
9442fi
9443
9444
Charles-François Natalid30b0222014-05-08 23:08:51 +01009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9446$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9447
9448# Check whether --with-address_sanitizer was given.
9449if test "${with_address_sanitizer+set}" = set; then :
9450 withval=$with_address_sanitizer;
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9452$as_echo "$withval" >&6; }
9453BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9454LDFLAGS="-fsanitize=address $LDFLAGS"
9455
9456else
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
9459fi
9460
9461
Guido van Rossum70c7f481998-03-26 18:44:10 +00009462# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9464$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9498$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009500 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009501fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009502 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9504$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009505if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009506 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009507else
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009509LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513/* Override any GCC internal prototype to avoid an error.
9514 Use char because int might match the return type of a GCC
9515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516#ifdef __cplusplus
9517extern "C"
9518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009519char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009520int
9521main ()
9522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009530else
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009533rm -f core conftest.err conftest.$ac_objext \
9534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009535LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9538$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009539if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009540 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009541fi
9542 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9545$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9551$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009552LIBS="$withval $LIBS"
9553
9554else
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557fi
9558
Guido van Rossum7f43da71994-08-01 12:15:30 +00009559
Victor Stinner8291b5e2015-03-20 16:03:14 +01009560
9561
9562
9563
9564
9565
9566
9567if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9568 if test -n "$ac_tool_prefix"; then
9569 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9570set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9572$as_echo_n "checking for $ac_word... " >&6; }
9573if ${ac_cv_path_PKG_CONFIG+:} false; then :
9574 $as_echo_n "(cached) " >&6
9575else
9576 case $PKG_CONFIG in
9577 [\\/]* | ?:[\\/]*)
9578 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9579 ;;
9580 *)
9581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9582for as_dir in $PATH
9583do
9584 IFS=$as_save_IFS
9585 test -z "$as_dir" && as_dir=.
9586 for ac_exec_ext in '' $ac_executable_extensions; do
9587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9588 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9590 break 2
9591 fi
9592done
9593 done
9594IFS=$as_save_IFS
9595
9596 ;;
9597esac
9598fi
9599PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9600if test -n "$PKG_CONFIG"; then
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9602$as_echo "$PKG_CONFIG" >&6; }
9603else
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9605$as_echo "no" >&6; }
9606fi
9607
9608
9609fi
9610if test -z "$ac_cv_path_PKG_CONFIG"; then
9611 ac_pt_PKG_CONFIG=$PKG_CONFIG
9612 # Extract the first word of "pkg-config", so it can be a program name with args.
9613set dummy pkg-config; ac_word=$2
9614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9615$as_echo_n "checking for $ac_word... " >&6; }
9616if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9617 $as_echo_n "(cached) " >&6
9618else
9619 case $ac_pt_PKG_CONFIG in
9620 [\\/]* | ?:[\\/]*)
9621 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9622 ;;
9623 *)
9624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625for as_dir in $PATH
9626do
9627 IFS=$as_save_IFS
9628 test -z "$as_dir" && as_dir=.
9629 for ac_exec_ext in '' $ac_executable_extensions; do
9630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9631 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9633 break 2
9634 fi
9635done
9636 done
9637IFS=$as_save_IFS
9638
9639 ;;
9640esac
9641fi
9642ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9643if test -n "$ac_pt_PKG_CONFIG"; then
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9645$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9646else
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9648$as_echo "no" >&6; }
9649fi
9650
9651 if test "x$ac_pt_PKG_CONFIG" = x; then
9652 PKG_CONFIG=""
9653 else
9654 case $cross_compiling:$ac_tool_warned in
9655yes:)
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9658ac_tool_warned=yes ;;
9659esac
9660 PKG_CONFIG=$ac_pt_PKG_CONFIG
9661 fi
9662else
9663 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9664fi
9665
9666fi
9667if test -n "$PKG_CONFIG"; then
9668 _pkg_min_version=0.9.0
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9670$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9671 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9673$as_echo "yes" >&6; }
9674 else
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
9677 PKG_CONFIG=""
9678 fi
9679fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009680
9681# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9683$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009684
9685# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009687 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009688else
9689 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009690fi
9691
9692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9694$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009695
9696# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9698$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009699
9700# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009701if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009702 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009703else
9704 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009705fi
9706
9707
9708if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009709 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9710else
9711 LIBFFI_INCLUDEDIR=""
9712fi
9713
9714
Matthias Kloseb9621712010-04-24 17:59:49 +00009715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9716$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009717
Stefan Krah60187b52012-03-23 19:06:27 +01009718# Check for use of the system libmpdec library
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9720$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9721
9722# Check whether --with-system_libmpdec was given.
9723if test "${with_system_libmpdec+set}" = set; then :
9724 withval=$with_system_libmpdec;
9725else
9726 with_system_libmpdec="no"
9727fi
9728
9729
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9731$as_echo "$with_system_libmpdec" >&6; }
9732
Benjamin Peterson076ed002010-10-31 17:11:02 +00009733# Check for support for loadable sqlite extensions
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9735$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9736# Check whether --enable-loadable-sqlite-extensions was given.
9737if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9738 enableval=$enable_loadable_sqlite_extensions;
9739else
9740 enable_loadable_sqlite_extensions="no"
9741fi
9742
9743
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9745$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9746
Ned Deilyd819b932013-09-06 01:07:05 -07009747# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9748
9749
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9751$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9752
9753# Check whether --with-tcltk-includes was given.
9754if test "${with_tcltk_includes+set}" = set; then :
9755 withval=$with_tcltk_includes;
9756else
9757 with_tcltk_includes="default"
9758fi
9759
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9761$as_echo "$with_tcltk_includes" >&6; }
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9763$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9764
9765# Check whether --with-tcltk-libs was given.
9766if test "${with_tcltk_libs+set}" = set; then :
9767 withval=$with_tcltk_libs;
9768else
9769 with_tcltk_libs="default"
9770fi
9771
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9773$as_echo "$with_tcltk_libs" >&6; }
9774if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9775then
9776 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9777 then
9778 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9779 fi
9780 TCLTK_INCLUDES=""
9781 TCLTK_LIBS=""
9782else
9783 TCLTK_INCLUDES="$with_tcltk_includes"
9784 TCLTK_LIBS="$with_tcltk_libs"
9785fi
9786
Matthias Klose55708cc2009-04-30 08:06:49 +00009787# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9789$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009790
9791# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009792if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009793 withval=$with_dbmliborder;
9794if test x$with_dbmliborder = xyes
9795then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009796as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009797else
9798 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9799 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9800 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009801 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009802 fi
9803 done
9804fi
9805fi
9806
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9808$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009809
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009810# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009811
9812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9814$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009817if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 withval=$with_signal_module;
9819fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009820
9821
9822if test -z "$with_signal_module"
9823then with_signal_module="yes"
9824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9826$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009827
9828if test "${with_signal_module}" = "yes"; then
9829 USE_SIGNAL_MODULE=""
9830 SIGNAL_OBJS=""
9831else
9832 USE_SIGNAL_MODULE="#"
9833 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9834fi
9835
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009836# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009837
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009838USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
9842# Templates for things AC_DEFINEd more than once.
9843# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009844
9845
Martin v. Löwis11437992002-04-12 09:54:03 +00009846
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9848$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852 withval=$with_threads;
9853fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009854
9855
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009856# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 withval=$with_thread; with_threads=$with_thread
9861fi
9862
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009863
9864if test -z "$with_threads"
9865then with_threads="yes"
9866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9868$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009869
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009870
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009871if test "$with_threads" = "no"
9872then
9873 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009874elif test "$ac_cv_pthread_is_default" = yes
9875then
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009877
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009878 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009880
9881 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009883elif test "$ac_cv_kpthread" = "yes"
9884then
9885 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009886 if test "$ac_cv_cxx_thread" = "yes"; then
9887 CXX="$CXX -Kpthread"
9888 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009890
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009891 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009892 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009893elif test "$ac_cv_kthread" = "yes"
9894then
9895 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009896 if test "$ac_cv_cxx_thread" = "yes"; then
9897 CXX="$CXX -Kthread"
9898 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009900
9901 posix_threads=yes
9902 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009903elif test "$ac_cv_pthread" = "yes"
9904then
9905 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009906 if test "$ac_cv_cxx_thread" = "yes"; then
9907 CXX="$CXX -pthread"
9908 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009910
9911 posix_threads=yes
9912 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009913else
9914 if test ! -z "$with_threads" -a -d "$with_threads"
9915 then LDFLAGS="$LDFLAGS -L$with_threads"
9916 fi
9917 if test ! -z "$withval" -a -d "$withval"
9918 then LDFLAGS="$LDFLAGS -L$withval"
9919 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009920
9921 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009922 # define _POSIX_THREADS in unistd.h. Some apparently don't
9923 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9925$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009928
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009929#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009930#ifdef _POSIX_THREADS
9931yes
9932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009933
9934_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009937 unistd_defines_pthreads=yes
9938else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009939 unistd_defines_pthreads=no
9940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009941rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9944$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009947
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009948 # Just looking for pthread_create in libpthread is not enough:
9949 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9950 # So we really have to include pthread.h, and then link.
9951 _libs=$LIBS
9952 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9954$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009957
9958#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009959#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009960
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009962int
9963main ()
9964{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009965
9966pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9974$as_echo "yes" >&6; }
9975 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009976
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009977 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009978 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009981 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009983if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009985
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009986 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009987 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009988else
Guido van Rossumad678af1998-10-02 14:42:15 +00009989
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9991$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009992if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009994else
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009996LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000/* Override any GCC internal prototype to avoid an error.
10001 Use char because int might match the return type of a GCC
10002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010003#ifdef __cplusplus
10004extern "C"
10005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010006char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010007int
10008main ()
10009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ;
10012 return 0;
10013}
10014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010017else
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010020rm -f core conftest.err conftest.$ac_objext \
10021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010022LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10025$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010026if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010028
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010029 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010030 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010031 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010032else
Greg Steinadf63d62000-07-05 10:38:09 +000010033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10035$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010036if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010038else
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010040LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044/* Override any GCC internal prototype to avoid an error.
10045 Use char because int might match the return type of a GCC
10046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010047#ifdef __cplusplus
10048extern "C"
10049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010050char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010051int
10052main ()
10053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ;
10056 return 0;
10057}
10058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010059if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064rm -f core conftest.err conftest.$ac_objext \
10065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010066LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10069$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010070if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010072
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010073 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010074 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010075 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010076else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10079$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010080if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010082else
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010084LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088/* Override any GCC internal prototype to avoid an error.
10089 Use char because int might match the return type of a GCC
10090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010091#ifdef __cplusplus
10092extern "C"
10093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010094char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010095int
10096main ()
10097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ;
10100 return 0;
10101}
10102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010103if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010105else
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010108rm -f core conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010110LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10113$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010114if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010116
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010117 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010118 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010119 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010120else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10123$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010124if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010126else
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010128LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132/* Override any GCC internal prototype to avoid an error.
10133 Use char because int might match the return type of a GCC
10134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135#ifdef __cplusplus
10136extern "C"
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010139int
10140main ()
10141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ;
10144 return 0;
10145}
10146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152rm -f core conftest.err conftest.$ac_objext \
10153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010154LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10157$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010158if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010161 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010162 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010163 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010164else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010165
Martin v. Löwis130fb172001-07-19 11:00:41 +000010166 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010167fi
10168
Guido van Rossum627b2d71993-12-24 10:39:16 +000010169
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010170fi
10171
Guido van Rossum0be3e491997-05-22 20:33:33 +000010172fi
10173
Guido van Rossum49545951997-12-02 19:28:29 +000010174fi
10175
Guido van Rossumb93a8621998-05-07 13:27:32 +000010176fi
10177
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010179rm -f core conftest.err conftest.$ac_objext \
10180 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10183$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010184if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010188LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192/* Override any GCC internal prototype to avoid an error.
10193 Use char because int might match the return type of a GCC
10194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010195#ifdef __cplusplus
10196extern "C"
10197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010198char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010199int
10200main ()
10201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010209else
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212rm -f core conftest.err conftest.$ac_objext \
10213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010214LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10217$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010218if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010220
Martin v. Löwis130fb172001-07-19 11:00:41 +000010221 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010222 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010223 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010224fi
10225
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010226
Neal Norwitza978ab02002-11-02 16:58:05 +000010227 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10229$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010230if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010232else
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010234LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238/* Override any GCC internal prototype to avoid an error.
10239 Use char because int might match the return type of a GCC
10240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010241#ifdef __cplusplus
10242extern "C"
10243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010244char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010245int
10246main ()
10247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ;
10250 return 0;
10251}
10252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010255else
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010258rm -f core conftest.err conftest.$ac_objext \
10259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010260LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10263$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010264if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010266
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010267 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010268 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010269 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010270fi
10271
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010272 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010273fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010274
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010275if test "$posix_threads" = "yes"; then
10276 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010279
10280 fi
10281
10282 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10283 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010284 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010285$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010286
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010287 ;;
10288 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010289$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010290
10291 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010292 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010293$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010294
10295 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010296 esac
10297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10299$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010300 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010304 ac_cv_pthread_system_supported=no
10305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010308
10309 #include <stdio.h>
10310 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010311 void *foo(void *parm) {
10312 return NULL;
10313 }
10314 main() {
10315 pthread_attr_t attr;
10316 pthread_t id;
10317 if (pthread_attr_init(&attr)) exit(-1);
10318 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10319 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10320 exit(0);
10321 }
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 ac_cv_pthread_system_supported=yes
10325else
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010330fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332
Guido van Rossum627b2d71993-12-24 10:39:16 +000010333fi
10334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10336$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010337 if test "$ac_cv_pthread_system_supported" = "yes"; then
10338
Matthias Kloseb9621712010-04-24 17:59:49 +000010339$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010340
10341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 for ac_func in pthread_sigmask
10343do :
10344 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010345if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010348_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010349 case $ac_sys_system in
10350 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010353
10354 ;;
10355 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010356fi
10357done
10358
Christian Heimesf77b4b22013-08-21 13:26:05 +020010359 for ac_func in pthread_atfork
10360do :
10361 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10362if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10363 cat >>confdefs.h <<_ACEOF
10364#define HAVE_PTHREAD_ATFORK 1
10365_ACEOF
10366
10367fi
10368done
10369
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010370fi
10371
10372
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010373# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10376$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010380 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010383 ipv6=no
10384 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10386$as_echo "yes" >&6; }
10387 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010388
10389 ipv6=yes
10390 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392else
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010396 /* AF_INET6 available check */
10397#include <sys/types.h>
10398#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010399int
10400main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010401{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010402int domain = AF_INET6;
10403 ;
10404 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405}
Martin v. Löwis11437992002-04-12 09:54:03 +000010406_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010407if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10410$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010411 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010412
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413else
Matthias Kloseb159a552010-04-25 21:00:44 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010417 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010418
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010419fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010422if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10424$as_echo_n "checking if RFC2553 API is available... " >&6; }
10425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010426/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010427
10428 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010429#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010430int
10431main ()
10432{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010433struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010434 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ;
10436 return 0;
10437}
Matthias Kloseb159a552010-04-25 21:00:44 +000010438
Martin v. Löwis11437992002-04-12 09:54:03 +000010439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010441
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010444 ipv6=yes
10445
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010446else
Matthias Kloseb159a552010-04-25 21:00:44 +000010447
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010449$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010450 ipv6=no
10451
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010454fi
10455
10456if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010458
10459fi
10460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461fi
10462
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010463
10464ipv6type=unknown
10465ipv6lib=none
10466ipv6trylibc=no
10467
10468if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10470$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010471 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10472 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010473 case $i in
10474 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010477
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010478#include <netinet/in.h>
10479#ifdef IPV6_INRIA_VERSION
10480yes
10481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010482_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010485 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010486fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010487rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010488
10489 ;;
10490 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010494#include <netinet/in.h>
10495#ifdef __KAME__
10496yes
10497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010501 ipv6type=$i;
10502 ipv6lib=inet6
10503 ipv6libdir=/usr/local/v6/lib
10504 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010505fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010506rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010507
10508 ;;
10509 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010512
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010513#include <features.h>
10514#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10515yes
10516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010517_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010520 ipv6type=$i;
10521 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010522fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010523rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524
10525 ;;
10526 linux-inet6)
10527 if test -d /usr/inet6; then
10528 ipv6type=$i
10529 ipv6lib=inet6
10530 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010531 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010532 fi
10533 ;;
10534 solaris)
10535 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010536 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010537 ipv6type=$i
10538 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010539 fi
10540 fi
10541 ;;
10542 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010544/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010545
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010546#include <sys/param.h>
10547#ifdef _TOSHIBA_INET6
10548yes
10549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010550_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010553 ipv6type=$i;
10554 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010555 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010556fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010557rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010558
10559 ;;
10560 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010562/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010563
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010564#include </usr/local/v6/include/sys/v6config.h>
10565#ifdef __V6D__
10566yes
10567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010568_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571 ipv6type=$i;
10572 ipv6lib=v6;
10573 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010574 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010576rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577
10578 ;;
10579 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010582
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583#include <sys/param.h>
10584#ifdef _ZETA_MINAMI_INET6
10585yes
10586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590 ipv6type=$i;
10591 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010592 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010594rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010595
10596 ;;
10597 esac
10598 if test "$ipv6type" != "unknown"; then
10599 break
10600 fi
10601 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10603$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604fi
10605
10606if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10607 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10608 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10609 echo "using lib$ipv6lib"
10610 else
10611 if test $ipv6trylibc = "yes"; then
10612 echo "using libc"
10613 else
10614 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10615 echo "You need to fetch lib$ipv6lib.a from appropriate"
10616 echo 'ipv6 kit and compile beforehand.'
10617 exit 1
10618 fi
10619 fi
10620fi
10621
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10623$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625/* end confdefs.h. */
10626 /* CAN_RAW_FD_FRAMES available check */
10627#include <linux/can/raw.h>
10628int
10629main ()
10630{
10631int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10632 ;
10633 return 0;
10634}
10635_ACEOF
10636if ac_fn_c_try_compile "$LINENO"; then :
10637
10638
10639$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10640
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10642$as_echo "yes" >&6; }
10643
10644else
10645
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
10648
10649fi
10650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10653$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010655/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010656
10657 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010658int
10659main ()
10660{
10661FSIORefNum fRef = 0
10662 ;
10663 return 0;
10664}
Matthias Kloseb159a552010-04-25 21:00:44 +000010665
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010668
Matthias Kloseb159a552010-04-25 21:00:44 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10673$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010674
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010675else
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010679
10680fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10682
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010683# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10685$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689 withval=$with_doc_strings;
10690fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010691
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010692
10693if test -z "$with_doc_strings"
10694then with_doc_strings="yes"
10695fi
10696if test "$with_doc_strings" != "no"
10697then
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010700
10701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10703$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010704
Antoine Pitrou042b1282010-08-13 21:15:58 +000010705# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10707$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010710if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010712if test "$withval" != no
10713then
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10718$as_echo "yes" >&6; }
10719else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010721fi
10722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10724$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725fi
10726
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010727
10728# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10730$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010733if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734 withval=$with_pymalloc;
10735fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010736
Neil Schemenauera35c6882001-02-27 04:45:05 +000010737
Neil Schemenauer16c22972002-03-22 15:34:49 +000010738if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010739then
10740 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010741fi
10742if test "$with_pymalloc" != "no"
10743then
Martin v. Löwis11437992002-04-12 09:54:03 +000010744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010746
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010747 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10750$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010751
Benjamin Peterson05159c42009-12-03 03:01:27 +000010752# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10754$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010755
10756# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010758 withval=$with_valgrind;
10759else
10760 with_valgrind=no
10761fi
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10764$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010765if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 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 +020010767if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010770
10771else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010772 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010773
10774fi
10775
10776
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010777 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010778fi
10779
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010780# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010781
Guido van Rossum98935bf2001-09-05 19:13:16 +000010782DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010783
Guido van Rossume97ee181999-12-20 21:27:22 +000010784# the dlopen() function means we might want to use dynload_shlib.o. some
10785# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010786for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010787do :
10788 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010791#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010792_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010793
Guido van Rossume97ee181999-12-20 21:27:22 +000010794fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010795done
Guido van Rossume97ee181999-12-20 21:27:22 +000010796
Michael W. Hudson54241132001-12-07 15:38:26 +000010797
Guido van Rossume97ee181999-12-20 21:27:22 +000010798# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10799# loading of modules.
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10802$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010803if test -z "$DYNLOADFILE"
10804then
10805 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010806 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10807 if test "$ac_cv_func_dlopen" = yes
10808 then DYNLOADFILE="dynload_shlib.o"
10809 else DYNLOADFILE="dynload_aix.o"
10810 fi
10811 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010812 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010813 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10814 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010815 *)
10816 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10817 # out any dynamic loading
10818 if test "$ac_cv_func_dlopen" = yes
10819 then DYNLOADFILE="dynload_shlib.o"
10820 else DYNLOADFILE="dynload_stub.o"
10821 fi
10822 ;;
10823 esac
10824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10826$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010827if test "$DYNLOADFILE" != "dynload_stub.o"
10828then
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010831
10832fi
10833
Neil Schemenauer4e425612001-06-19 15:44:15 +000010834# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10835
Michael W. Hudson54241132001-12-07 15:38:26 +000010836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10838$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010839if test -z "$MACHDEP_OBJS"
10840then
Jack Jansene578a632001-08-15 01:27:14 +000010841 MACHDEP_OBJS=$extra_machdep_objs
10842else
10843 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010844fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010845if test -z "$MACHDEP_OBJS"; then
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10847$as_echo "none" >&6; }
10848else
10849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10850$as_echo "$MACHDEP_OBJS" >&6; }
10851fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010852
Guido van Rossum627b2d71993-12-24 10:39:16 +000010853# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010854for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010855 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010856 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010857 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010858 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010859 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010860 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010861 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10862 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010863 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010864 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010865 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010866 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010867 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010868 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010869 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10870 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010871 sigaction sigaltstack siginterrupt sigpending sigrelse \
10872 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010873 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010874 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010875 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010876do :
10877 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10878ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010879if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010882_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010884fi
10885done
10886
Michael W. Hudson54241132001-12-07 15:38:26 +000010887
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010888ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10889 #include <dirent.h>
10890"
10891if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10892
10893$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10894
10895fi
10896
10897
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010898# For some functions, having a definition is not sufficient, since
10899# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10901$as_echo_n "checking for chroot... " >&6; }
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010904#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010905int
10906main ()
10907{
10908void *x=chroot
10909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010914
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010916
Matthias Kloseb159a552010-04-25 21:00:44 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010922
10923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10926$as_echo_n "checking for link... " >&6; }
10927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010928/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010929#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010930int
10931main ()
10932{
10933void *x=link
10934 ;
10935 return 0;
10936}
10937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010941
Matthias Kloseb159a552010-04-25 21:00:44 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010947
10948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10951$as_echo_n "checking for symlink... " >&6; }
10952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010954#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010955int
10956main ()
10957{
10958void *x=symlink
10959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010966
Matthias Kloseb159a552010-04-25 21:00:44 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010972
10973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10976$as_echo_n "checking for fchdir... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010979#include <unistd.h>
10980int
10981main ()
10982{
10983void *x=fchdir
10984 ;
10985 return 0;
10986}
10987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010991
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010997
10998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11001$as_echo_n "checking for fsync... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011004#include <unistd.h>
11005int
11006main ()
11007{
11008void *x=fsync
11009 ;
11010 return 0;
11011}
11012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011016
Matthias Kloseb159a552010-04-25 21:00:44 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011022
11023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11026$as_echo_n "checking for fdatasync... " >&6; }
11027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011029#include <unistd.h>
11030int
11031main ()
11032{
11033void *x=fdatasync
11034 ;
11035 return 0;
11036}
11037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011041
Matthias Kloseb159a552010-04-25 21:00:44 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011044else
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011047
11048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11051$as_echo_n "checking for epoll... " >&6; }
11052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011053/* end confdefs.h. */
11054#include <sys/epoll.h>
11055int
11056main ()
11057{
11058void *x=epoll_create
11059 ;
11060 return 0;
11061}
11062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011066
Matthias Kloseb159a552010-04-25 21:00:44 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011068$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011069else
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11071$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011072
11073fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11076$as_echo_n "checking for epoll_create1... " >&6; }
11077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078/* end confdefs.h. */
11079#include <sys/epoll.h>
11080int
11081main ()
11082{
11083void *x=epoll_create1
11084 ;
11085 return 0;
11086}
11087_ACEOF
11088if ac_fn_c_try_compile "$LINENO"; then :
11089
11090$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11091
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11093$as_echo "yes" >&6; }
11094else
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096$as_echo "no" >&6; }
11097
11098fi
11099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11101$as_echo_n "checking for kqueue... " >&6; }
11102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011103/* end confdefs.h. */
11104
11105#include <sys/types.h>
11106#include <sys/event.h>
11107
11108int
11109main ()
11110{
11111int x=kqueue()
11112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011119
Matthias Kloseb159a552010-04-25 21:00:44 +000011120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011125
11126fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11129$as_echo_n "checking for prlimit... " >&6; }
11130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11131/* end confdefs.h. */
11132
11133#include <sys/time.h>
11134#include <sys/resource.h>
11135
11136int
11137main ()
11138{
11139void *x=prlimit
11140 ;
11141 return 0;
11142}
11143_ACEOF
11144if ac_fn_c_try_compile "$LINENO"; then :
11145
11146$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11147
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11149$as_echo "yes" >&6; }
11150else
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
11153
11154fi
11155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11156
Martin v. Löwisd5843682002-11-21 20:41:28 +000011157# On some systems (eg. FreeBSD 5), we would find a definition of the
11158# functions ctermid_r, setgroups in the library, but no prototype
11159# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11160# address to avoid compiler warnings and potential miscompilations
11161# because of the missing prototypes.
11162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11164$as_echo_n "checking for ctermid_r... " >&6; }
11165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011166/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011167
Martin v. Löwisd5843682002-11-21 20:41:28 +000011168#include <stdio.h>
11169
Martin v. Löwisd5843682002-11-21 20:41:28 +000011170int
11171main ()
11172{
11173void* p = ctermid_r
11174 ;
11175 return 0;
11176}
11177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011181
Matthias Kloseb159a552010-04-25 21:00:44 +000011182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011183$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011184else
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11186$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011187
11188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11190
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11192$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011194 $as_echo_n "(cached) " >&6
11195else
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011197/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011198#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011199int
11200main ()
11201{
11202void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011203
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011209 ac_cv_flock_decl=yes
11210else
11211 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011212
11213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011215
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011216fi
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11218$as_echo "$ac_cv_flock_decl" >&6; }
11219if test "x${ac_cv_flock_decl}" = xyes; then
11220 for ac_func in flock
11221do :
11222 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011223if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011224 cat >>confdefs.h <<_ACEOF
11225#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011226_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011227
Antoine Pitroua3000072010-09-07 14:52:42 +000011228else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011230$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011231if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011232 $as_echo_n "(cached) " >&6
11233else
11234 ac_check_lib_save_LIBS=$LIBS
11235LIBS="-lbsd $LIBS"
11236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11237/* end confdefs.h. */
11238
11239/* Override any GCC internal prototype to avoid an error.
11240 Use char because int might match the return type of a GCC
11241 builtin and then its argument prototype would still apply. */
11242#ifdef __cplusplus
11243extern "C"
11244#endif
11245char flock ();
11246int
11247main ()
11248{
11249return flock ();
11250 ;
11251 return 0;
11252}
11253_ACEOF
11254if ac_fn_c_try_link "$LINENO"; then :
11255 ac_cv_lib_bsd_flock=yes
11256else
11257 ac_cv_lib_bsd_flock=no
11258fi
11259rm -f core conftest.err conftest.$ac_objext \
11260 conftest$ac_exeext conftest.$ac_ext
11261LIBS=$ac_check_lib_save_LIBS
11262fi
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11264$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011265if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011266 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011267
11268
11269$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11270
11271
11272fi
11273
11274
11275fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011276done
11277
Antoine Pitroua3000072010-09-07 14:52:42 +000011278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11281$as_echo_n "checking for getpagesize... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011284
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011285#include <unistd.h>
11286
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011287int
11288main ()
11289{
11290void* p = getpagesize
11291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011298
Matthias Kloseb159a552010-04-25 21:00:44 +000011299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011300$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011301else
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011304
11305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011307
Victor Stinner984890f2011-11-24 13:53:38 +010011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11309$as_echo_n "checking for broken unsetenv... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11311/* end confdefs.h. */
11312
11313#include <stdlib.h>
11314
11315int
11316main ()
11317{
11318int res = unsetenv("DUMMY")
11319 ;
11320 return 0;
11321}
11322_ACEOF
11323if ac_fn_c_try_compile "$LINENO"; then :
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
11326else
11327
11328$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11329
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11331$as_echo "yes" >&6; }
11332
11333fi
11334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11335
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011336for ac_prog in true
11337do
11338 # Extract the first word of "$ac_prog", so it can be a program name with args.
11339set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11341$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011342if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011344else
11345 if test -n "$TRUE"; then
11346 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11347else
11348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11349for as_dir in $PATH
11350do
11351 IFS=$as_save_IFS
11352 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011354 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011355 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 $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 +000011357 break 2
11358 fi
11359done
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011362
11363fi
11364fi
11365TRUE=$ac_cv_prog_TRUE
11366if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11368$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011372fi
11373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011375 test -n "$TRUE" && break
11376done
11377test -n "$TRUE" || TRUE="/bin/true"
11378
11379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11381$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011384else
11385 ac_check_lib_save_LIBS=$LIBS
11386LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011388/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390/* Override any GCC internal prototype to avoid an error.
11391 Use char because int might match the return type of a GCC
11392 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011393#ifdef __cplusplus
11394extern "C"
11395#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011396char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011397int
11398main ()
11399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406 ac_cv_lib_c_inet_aton=yes
11407else
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011410rm -f core conftest.err conftest.$ac_objext \
11411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011412LIBS=$ac_check_lib_save_LIBS
11413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11415$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011416if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011417 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11420$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011421if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011422 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011423else
11424 ac_check_lib_save_LIBS=$LIBS
11425LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429/* Override any GCC internal prototype to avoid an error.
11430 Use char because int might match the return type of a GCC
11431 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011432#ifdef __cplusplus
11433extern "C"
11434#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011435char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011436int
11437main ()
11438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011440 ;
11441 return 0;
11442}
11443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011445 ac_cv_lib_resolv_inet_aton=yes
11446else
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011449rm -f core conftest.err conftest.$ac_objext \
11450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011451LIBS=$ac_check_lib_save_LIBS
11452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11454$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011455if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011456 cat >>confdefs.h <<_ACEOF
11457#define HAVE_LIBRESOLV 1
11458_ACEOF
11459
11460 LIBS="-lresolv $LIBS"
11461
11462fi
11463
11464
11465fi
11466
11467
Christian Heimesd0764e22007-12-04 15:00:33 +000011468# On Tru64, chflags seems to be present, but calling it will
11469# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11471$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011472if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011474else
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011476 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011477else
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011479/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011480
Christian Heimesd0764e22007-12-04 15:00:33 +000011481#include <sys/stat.h>
11482#include <unistd.h>
11483int main(int argc, char*argv[])
11484{
11485 if(chflags(argv[0], 0) != 0)
11486 return 1;
11487 return 0;
11488}
Ned Deily3eb67d52011-06-28 00:00:28 -070011489
Christian Heimesd0764e22007-12-04 15:00:33 +000011490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011491if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011492 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011493else
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011498fi
11499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011500
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11503$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011504if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011506if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011507 ac_cv_have_chflags="yes"
11508else
11509 ac_cv_have_chflags="no"
11510fi
11511
11512fi
11513if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011516
11517fi
11518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11520$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011521if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011525 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011528/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011529
Christian Heimesd0764e22007-12-04 15:00:33 +000011530#include <sys/stat.h>
11531#include <unistd.h>
11532int main(int argc, char*argv[])
11533{
11534 if(lchflags(argv[0], 0) != 0)
11535 return 1;
11536 return 0;
11537}
Ned Deily3eb67d52011-06-28 00:00:28 -070011538
Christian Heimesd0764e22007-12-04 15:00:33 +000011539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011540if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011541 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011542else
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011547fi
11548
11549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11552$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011553if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011555if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011556 ac_cv_have_lchflags="yes"
11557else
11558 ac_cv_have_lchflags="no"
11559fi
11560
11561fi
11562if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011565
11566fi
11567
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011568case $ac_sys_system/$ac_sys_release in
11569Darwin/*)
11570 _CUR_CFLAGS="${CFLAGS}"
11571 _CUR_LDFLAGS="${LDFLAGS}"
11572 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11573 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11574 ;;
11575esac
11576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11578$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011579if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011581else
11582 ac_check_lib_save_LIBS=$LIBS
11583LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011585/* end confdefs.h. */
11586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587/* Override any GCC internal prototype to avoid an error.
11588 Use char because int might match the return type of a GCC
11589 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011590#ifdef __cplusplus
11591extern "C"
11592#endif
11593char inflateCopy ();
11594int
11595main ()
11596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011598 ;
11599 return 0;
11600}
11601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011602if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011603 ac_cv_lib_z_inflateCopy=yes
11604else
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011607rm -f core conftest.err conftest.$ac_objext \
11608 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011609LIBS=$ac_check_lib_save_LIBS
11610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11612$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011613if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011616
11617fi
11618
11619
11620case $ac_sys_system/$ac_sys_release in
11621Darwin/*)
11622 CFLAGS="${_CUR_CFLAGS}"
11623 LDFLAGS="${_CUR_LDFLAGS}"
11624 ;;
11625esac
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11628$as_echo_n "checking for hstrerror... " >&6; }
11629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011631
Martin v. Löwise9416172003-05-03 10:12:45 +000011632#include <netdb.h>
11633
Martin v. Löwise9416172003-05-03 10:12:45 +000011634int
11635main ()
11636{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011645
Matthias Kloseb159a552010-04-25 21:00:44 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011651
11652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011653rm -f core conftest.err conftest.$ac_objext \
11654 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11657$as_echo_n "checking for inet_aton... " >&6; }
11658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011660
Martin v. Löwis86d66262006-02-17 08:40:11 +000011661#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011662#include <sys/socket.h>
11663#include <netinet/in.h>
11664#include <arpa/inet.h>
11665
Martin v. Löwise9416172003-05-03 10:12:45 +000011666int
11667main ()
11668{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011669void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011677
Matthias Kloseb159a552010-04-25 21:00:44 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011683
11684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011685rm -f core conftest.err conftest.$ac_objext \
11686 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11689$as_echo_n "checking for inet_pton... " >&6; }
11690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011691/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011692
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011693#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011694#include <sys/socket.h>
11695#include <netinet/in.h>
11696#include <arpa/inet.h>
11697
Martin v. Löwise9416172003-05-03 10:12:45 +000011698int
11699main ()
11700{
11701void* p = inet_pton
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011709
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011715
11716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011718
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011719# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11721$as_echo_n "checking for setgroups... " >&6; }
11722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011724
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011725#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011726#ifdef HAVE_GRP_H
11727#include <grp.h>
11728#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011729
Martin v. Löwisd5843682002-11-21 20:41:28 +000011730int
11731main ()
11732{
11733void* p = setgroups
11734 ;
11735 return 0;
11736}
11737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011741
Matthias Kloseb159a552010-04-25 21:00:44 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011743$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11746$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011747
11748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011751# check for openpty and forkpty
11752
11753for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011754do :
11755 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011758#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011759_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011760
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011761else
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11763$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011766else
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011768LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772/* Override any GCC internal prototype to avoid an error.
11773 Use char because int might match the return type of a GCC
11774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011775#ifdef __cplusplus
11776extern "C"
11777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011778char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011779int
11780main ()
11781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011782return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792rm -f core conftest.err conftest.$ac_objext \
11793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011794LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11797$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11803$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011804if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011805 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011806else
11807 ac_check_lib_save_LIBS=$LIBS
11808LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011810/* end confdefs.h. */
11811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011812/* Override any GCC internal prototype to avoid an error.
11813 Use char because int might match the return type of a GCC
11814 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011815#ifdef __cplusplus
11816extern "C"
11817#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011818char openpty ();
11819int
11820main ()
11821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011828 ac_cv_lib_bsd_openpty=yes
11829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011832rm -f core conftest.err conftest.$ac_objext \
11833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011834LIBS=$ac_check_lib_save_LIBS
11835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11837$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011838if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011840 LIBS="$LIBS -lbsd"
11841fi
11842
11843
11844fi
11845
Fred Drake8cef4cf2000-06-28 16:40:38 +000011846
11847fi
11848done
11849
11850for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011851do :
11852 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011856_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857
Fred Drake8cef4cf2000-06-28 16:40:38 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11860$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011863else
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011865LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869/* Override any GCC internal prototype to avoid an error.
11870 Use char because int might match the return type of a GCC
11871 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011872#ifdef __cplusplus
11873extern "C"
11874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011875char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011876int
11877main ()
11878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011880 ;
11881 return 0;
11882}
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core conftest.err conftest.$ac_objext \
11890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011891LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11894$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011897 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11900$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011903else
11904 ac_check_lib_save_LIBS=$LIBS
11905LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011907/* end confdefs.h. */
11908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909/* Override any GCC internal prototype to avoid an error.
11910 Use char because int might match the return type of a GCC
11911 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011912#ifdef __cplusplus
11913extern "C"
11914#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011915char forkpty ();
11916int
11917main ()
11918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011925 ac_cv_lib_bsd_forkpty=yes
11926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core conftest.err conftest.$ac_objext \
11930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011931LIBS=$ac_check_lib_save_LIBS
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11934$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011937 LIBS="$LIBS -lbsd"
11938fi
11939
11940
11941fi
11942
Fred Drake8cef4cf2000-06-28 16:40:38 +000011943
11944fi
11945done
11946
Jack Jansendd19cf82001-12-06 22:36:17 +000011947
Christian Heimesb186d002008-03-18 15:15:01 +000011948# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011949for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011950do :
11951 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011952if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011953 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011955_ACEOF
11956
11957fi
11958done
11959
11960
Michael W. Hudson54241132001-12-07 15:38:26 +000011961# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011962for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011963do :
11964 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11965ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011966if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011968#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011969_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011970
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011972done
11973
Michael W. Hudson54241132001-12-07 15:38:26 +000011974
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011975ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011976if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011977 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011978
Martin v. Löwis1142de32002-03-29 16:28:31 +000011979else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011981 *" dup2.$ac_objext "* ) ;;
11982 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011984esac
11985
Martin v. Löwis1142de32002-03-29 16:28:31 +000011986fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011987
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011988ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011989if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011990 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11991
11992else
11993 case " $LIBOBJS " in
11994 *" strdup.$ac_objext "* ) ;;
11995 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11996 ;;
11997esac
11998
11999fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012000
12001
12002for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012003do :
12004 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012005if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012012int
12013main ()
12014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012023
Guido van Rossum627b2d71993-12-24 10:39:16 +000012024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012026
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012028done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012029
Jack Jansen150753c2003-03-29 22:07:47 +000012030for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012031do :
12032 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012033if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012034 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012038/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012039#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012040int
12041main ()
12042{
12043setpgrp(0,0);
12044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012051
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012054
12055fi
12056done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012057
Thomas Wouters3a584202000-08-05 23:28:51 +000012058for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012059do :
12060 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012061if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012063#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012067#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012071gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_compile "$LINENO"; then :
12077
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078else
Skip Montanaro6dead952003-09-25 14:50:04 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
Guido van Rossum627b2d71993-12-24 10:39:16 +000012083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012085
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012087done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012088
Michael W. Hudson54241132001-12-07 15:38:26 +000012089
Victor Stinnere0be4232011-10-25 13:06:09 +020012090for ac_func in clock_gettime
12091do :
12092 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12093if test "x$ac_cv_func_clock_gettime" = xyes; then :
12094 cat >>confdefs.h <<_ACEOF
12095#define HAVE_CLOCK_GETTIME 1
12096_ACEOF
12097
12098else
12099
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12101$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12102if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12103 $as_echo_n "(cached) " >&6
12104else
12105 ac_check_lib_save_LIBS=$LIBS
12106LIBS="-lrt $LIBS"
12107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108/* end confdefs.h. */
12109
12110/* Override any GCC internal prototype to avoid an error.
12111 Use char because int might match the return type of a GCC
12112 builtin and then its argument prototype would still apply. */
12113#ifdef __cplusplus
12114extern "C"
12115#endif
12116char clock_gettime ();
12117int
12118main ()
12119{
12120return clock_gettime ();
12121 ;
12122 return 0;
12123}
12124_ACEOF
12125if ac_fn_c_try_link "$LINENO"; then :
12126 ac_cv_lib_rt_clock_gettime=yes
12127else
12128 ac_cv_lib_rt_clock_gettime=no
12129fi
12130rm -f core conftest.err conftest.$ac_objext \
12131 conftest$ac_exeext conftest.$ac_ext
12132LIBS=$ac_check_lib_save_LIBS
12133fi
12134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12135$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12136if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12137
Victor Stinner7efb8332014-08-29 15:41:08 +020012138 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012139 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12140
12141
12142$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12143
12144
12145fi
12146
12147
12148fi
12149done
12150
12151
12152for ac_func in clock_getres
12153do :
12154 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12155if test "x$ac_cv_func_clock_getres" = xyes; then :
12156 cat >>confdefs.h <<_ACEOF
12157#define HAVE_CLOCK_GETRES 1
12158_ACEOF
12159
12160else
12161
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12163$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12164if ${ac_cv_lib_rt_clock_getres+:} false; then :
12165 $as_echo_n "(cached) " >&6
12166else
12167 ac_check_lib_save_LIBS=$LIBS
12168LIBS="-lrt $LIBS"
12169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12170/* end confdefs.h. */
12171
12172/* Override any GCC internal prototype to avoid an error.
12173 Use char because int might match the return type of a GCC
12174 builtin and then its argument prototype would still apply. */
12175#ifdef __cplusplus
12176extern "C"
12177#endif
12178char clock_getres ();
12179int
12180main ()
12181{
12182return clock_getres ();
12183 ;
12184 return 0;
12185}
12186_ACEOF
12187if ac_fn_c_try_link "$LINENO"; then :
12188 ac_cv_lib_rt_clock_getres=yes
12189else
12190 ac_cv_lib_rt_clock_getres=no
12191fi
12192rm -f core conftest.err conftest.$ac_objext \
12193 conftest$ac_exeext conftest.$ac_ext
12194LIBS=$ac_check_lib_save_LIBS
12195fi
12196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12197$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12198if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12199
12200 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12201
12202
12203fi
12204
12205
12206fi
12207done
12208
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12211$as_echo_n "checking for major... " >&6; }
12212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012214
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012215#if defined(MAJOR_IN_MKDEV)
12216#include <sys/mkdev.h>
12217#elif defined(MAJOR_IN_SYSMACROS)
12218#include <sys/sysmacros.h>
12219#else
12220#include <sys/types.h>
12221#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012222
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012223int
12224main ()
12225{
12226
12227 makedev(major(0),minor(0));
12228
12229 ;
12230 return 0;
12231}
12232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012234
12235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12239$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012240
12241else
Skip Montanaro6dead952003-09-25 14:50:04 +000012242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12244$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012245
12246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012247rm -f core conftest.err conftest.$ac_objext \
12248 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012249
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012250# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012251# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12253$as_echo_n "checking for getaddrinfo... " >&6; }
12254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012256
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012257#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012258#include <sys/socket.h>
12259#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012260#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012261
Martin v. Löwis11437992002-04-12 09:54:03 +000012262int
12263main ()
12264{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012265getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012271 have_getaddrinfo=yes
12272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275rm -f core conftest.err conftest.$ac_objext \
12276 conftest$ac_exeext conftest.$ac_ext
12277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12278$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012279if test $have_getaddrinfo = yes
12280then
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12282$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012283 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012287
12288if test "${enable_ipv6+set}" = set; then
12289 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12290else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012291 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012292fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012293else
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012296
Stefan Krah19c21392012-11-22 23:47:32 +010012297#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298#include <sys/types.h>
12299#include <netdb.h>
12300#include <string.h>
12301#include <sys/socket.h>
12302#include <netinet/in.h>
12303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012304int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012305{
12306 int passive, gaierr, inet4 = 0, inet6 = 0;
12307 struct addrinfo hints, *ai, *aitop;
12308 char straddr[INET6_ADDRSTRLEN], strport[16];
12309
12310 for (passive = 0; passive <= 1; passive++) {
12311 memset(&hints, 0, sizeof(hints));
12312 hints.ai_family = AF_UNSPEC;
12313 hints.ai_flags = passive ? AI_PASSIVE : 0;
12314 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012315 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012316 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12317 (void)gai_strerror(gaierr);
12318 goto bad;
12319 }
12320 for (ai = aitop; ai; ai = ai->ai_next) {
12321 if (ai->ai_addr == NULL ||
12322 ai->ai_addrlen == 0 ||
12323 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12324 straddr, sizeof(straddr), strport, sizeof(strport),
12325 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12326 goto bad;
12327 }
12328 switch (ai->ai_family) {
12329 case AF_INET:
12330 if (strcmp(strport, "54321") != 0) {
12331 goto bad;
12332 }
12333 if (passive) {
12334 if (strcmp(straddr, "0.0.0.0") != 0) {
12335 goto bad;
12336 }
12337 } else {
12338 if (strcmp(straddr, "127.0.0.1") != 0) {
12339 goto bad;
12340 }
12341 }
12342 inet4++;
12343 break;
12344 case AF_INET6:
12345 if (strcmp(strport, "54321") != 0) {
12346 goto bad;
12347 }
12348 if (passive) {
12349 if (strcmp(straddr, "::") != 0) {
12350 goto bad;
12351 }
12352 } else {
12353 if (strcmp(straddr, "::1") != 0) {
12354 goto bad;
12355 }
12356 }
12357 inet6++;
12358 break;
12359 case AF_UNSPEC:
12360 goto bad;
12361 break;
12362 default:
12363 /* another family support? */
12364 break;
12365 }
12366 }
12367 }
12368
12369 if (!(inet4 == 0 || inet4 == 2))
12370 goto bad;
12371 if (!(inet6 == 0 || inet6 == 2))
12372 goto bad;
12373
12374 if (aitop)
12375 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012376 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012377
12378 bad:
12379 if (aitop)
12380 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012381 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382}
12383
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012386 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012394fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12399$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12400
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012401if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012402then
12403 if test $ipv6 = yes
12404 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405 echo 'Fatal: You must get working getaddrinfo() function.'
12406 echo ' or you can specify "--disable-ipv6"'.
12407 exit 1
12408 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012409else
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012412
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012413fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012414
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012415for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012416do :
12417 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012418if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012420#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012421_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423fi
12424done
12425
Michael W. Hudson54241132001-12-07 15:38:26 +000012426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12429$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012430if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435#include <sys/types.h>
12436#include <sys/time.h>
12437#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Martin v. Löwis11437992002-04-12 09:54:03 +000012439int
12440main ()
12441{
12442if ((struct tm *) 0)
12443return 0;
12444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12456$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012457if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460
12461fi
12462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12464$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470#include <sys/types.h>
12471#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476struct tm tm;
12477 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484 ac_cv_struct_tm=time.h
12485else
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12491$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012492if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495
12496fi
12497
Matthias Kloseb9621712010-04-24 17:59:49 +000012498ac_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 +000012499#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501"
Victor Stinnere0be4232011-10-25 13:06:09 +020012502if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
12504cat >>confdefs.h <<_ACEOF
12505#define HAVE_STRUCT_TM_TM_ZONE 1
12506_ACEOF
12507
12508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012510
Martin v. Löwis11437992002-04-12 09:54:03 +000012511if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012514
12515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12517"
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522fi
12523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012525#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526_ACEOF
12527
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12529$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536#if !HAVE_DECL_TZNAME
12537extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Martin v. Löwis11437992002-04-12 09:54:03 +000012540int
12541main ()
12542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 ;
12545 return 0;
12546}
12547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012548if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549 ac_cv_var_tzname=yes
12550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012553rm -f core conftest.err conftest.$ac_objext \
12554 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12557$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012558 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562 fi
12563fi
12564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565ac_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 +020012566if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012567
12568cat >>confdefs.h <<_ACEOF
12569#define HAVE_STRUCT_STAT_ST_RDEV 1
12570_ACEOF
12571
12572
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012573fi
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575ac_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 +020012576if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012577
Martin v. Löwis11437992002-04-12 09:54:03 +000012578cat >>confdefs.h <<_ACEOF
12579#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12580_ACEOF
12581
12582
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012583fi
12584
Matthias Kloseb9621712010-04-24 17:59:49 +000012585ac_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 +020012586if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012587
12588cat >>confdefs.h <<_ACEOF
12589#define HAVE_STRUCT_STAT_ST_FLAGS 1
12590_ACEOF
12591
12592
12593fi
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595ac_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 +020012596if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012597
12598cat >>confdefs.h <<_ACEOF
12599#define HAVE_STRUCT_STAT_ST_GEN 1
12600_ACEOF
12601
12602
12603fi
12604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605ac_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 +020012606if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012607
12608cat >>confdefs.h <<_ACEOF
12609#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12610_ACEOF
12611
12612
12613fi
12614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615ac_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 +020012616if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012617
Martin v. Löwis11437992002-04-12 09:54:03 +000012618cat >>confdefs.h <<_ACEOF
12619#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12620_ACEOF
12621
12622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012624
12625else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012627 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12629 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012630esac
12631
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012632fi
12633
Michael W. Hudson54241132001-12-07 15:38:26 +000012634
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12637$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012638if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640else
Matthias Kloseb159a552010-04-25 21:00:44 +000012641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012643/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012644#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012645int
12646main ()
12647{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654 ac_cv_header_time_altzone=yes
12655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660fi
12661
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12663$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667
12668fi
12669
Guido van Rossumda88dad1995-01-26 00:46:29 +000012670was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12672$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012675
12676#include <sys/types.h>
12677#include <sys/select.h>
12678#include <sys/time.h>
12679
Martin v. Löwis11437992002-04-12 09:54:03 +000012680int
12681main ()
12682{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683;
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
12690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012693 was_it_defined=yes
12694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12698$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12701$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012702if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012707#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717 ac_cv_struct_addrinfo=yes
12718else
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12722fi
12723
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12725$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
Matthias Kloseb9621712010-04-24 17:59:49 +000012728$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729
12730fi
12731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12733$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012734if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736else
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012739
12740# include <sys/types.h>
12741# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012751 ac_cv_struct_sockaddr_storage=yes
12752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12756fi
12757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12759$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012763
12764fi
12765
Guido van Rossum627b2d71993-12-24 10:39:16 +000012766# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12769$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012776int
12777main ()
12778{
12779static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012780test_array [0] = 0;
12781return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
12783 ;
12784 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012785}
Martin v. Löwis11437992002-04-12 09:54:03 +000012786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012788 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12795$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012796if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798
12799fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12802$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012803if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012814 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012816 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818 char const *const *pcpcc;
12819 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 /* NEC SVR4.0.2 mips cc rejects this. */
12821 struct point {int x, y;};
12822 static struct point const zero = {0,0};
12823 /* AIX XL C 1.02.0.0 rejects this.
12824 It does not let you subtract one const X* pointer from another in
12825 an arm of an if-expression whose if-part is not a constant
12826 expression */
12827 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830 ++pcpcc;
12831 ppc = (char**) pcpcc;
12832 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012833 { /* SCO 3.2v4 cc rejects this sort of thing. */
12834 char tx;
12835 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 }
12841 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12842 int x[] = {25, 17};
12843 const int *foo = &x[0];
12844 ++foo;
12845 }
12846 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12847 typedef const int *iptr;
12848 iptr p = 0;
12849 ++p;
12850 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012851 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012853 struct s { int j; const int *ap[3]; } bx;
12854 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 }
12856 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12857 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012861#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012862
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012865}
Martin v. Löwis11437992002-04-12 09:54:03 +000012866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868 ac_cv_c_const=yes
12869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12875$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879
12880fi
12881
Michael W. Hudson54241132001-12-07 15:38:26 +000012882
Guido van Rossumda88dad1995-01-26 00:46:29 +000012883works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12885$as_echo_n "checking for working volatile... " >&6; }
12886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012888
Martin v. Löwis11437992002-04-12 09:54:03 +000012889int
12890main ()
12891{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ;
12894 return 0;
12895}
12896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012897if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012898 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012899else
Skip Montanaro6dead952003-09-25 14:50:04 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012902
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012903
Guido van Rossum627b2d71993-12-24 10:39:16 +000012904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12907$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012908
Guido van Rossumda88dad1995-01-26 00:46:29 +000012909works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12911$as_echo_n "checking for working signed char... " >&6; }
12912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012913/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915int
12916main ()
12917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012924 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012925else
Skip Montanaro6dead952003-09-25 14:50:04 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012928
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012929
Guido van Rossum7f43da71994-08-01 12:15:30 +000012930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12933$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012934
Guido van Rossumda88dad1995-01-26 00:46:29 +000012935have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12937$as_echo_n "checking for prototypes... " >&6; }
12938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012939/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012940int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012941int
12942main ()
12943{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ;
12946 return 0;
12947}
12948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb159a552010-04-25 21:00:44 +000012953 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12957$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012958
Guido van Rossumda88dad1995-01-26 00:46:29 +000012959works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12961$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012964
12965#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012966int foo(int x, ...) {
12967 va_list va;
12968 va_start(va, x);
12969 va_arg(va, int);
12970 va_arg(va, char *);
12971 va_arg(va, double);
12972 return 0;
12973}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975int
12976main ()
12977{
Guido van Rossum90eea071996-08-30 20:58:57 +000012978return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ;
12980 return 0;
12981}
12982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
12985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012987
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012988 works=yes
12989
Guido van Rossum627b2d71993-12-24 10:39:16 +000012990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12993$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994
Martin v. Löwisd6320502004-08-12 13:45:08 +000012995# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12997$as_echo_n "checking for socketpair... " >&6; }
12998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012999/* end confdefs.h. */
13000
13001#include <sys/types.h>
13002#include <sys/socket.h>
13003
13004int
13005main ()
13006{
13007void *x=socketpair
13008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013015
Matthias Kloseb159a552010-04-25 21:00:44 +000013016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013017$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013021
13022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013024
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13027$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013029/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030#include <sys/types.h>
13031#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013032int
13033main ()
13034{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035struct sockaddr x;
13036x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_compile "$LINENO"; then :
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13043$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013046
13047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013050
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053
Guido van Rossumda88dad1995-01-26 00:46:29 +000013054va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13056$as_echo_n "checking whether va_list is an array... " >&6; }
13057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013058/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059
13060#ifdef HAVE_STDARG_PROTOTYPES
13061#include <stdarg.h>
13062#else
13063#include <varargs.h>
13064#endif
13065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066int
13067main ()
13068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ;
13071 return 0;
13072}
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
13075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076else
Skip Montanaro6dead952003-09-25 14:50:04 +000013077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Guido van Rossumda88dad1995-01-26 00:46:29 +000013081 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013082
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13086$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013088# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013092if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13097$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013098 OLD_CFLAGS=$CFLAGS
13099 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013101/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013102
13103# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105int
13106main ()
13107{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013108
13109 char *name;
13110 struct hostent *he, *res;
13111 char buffer[2048];
13112 int buflen = 2048;
13113 int h_errnop;
13114
13115 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
13117 ;
13118 return 0;
13119}
13120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013124
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13129$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013130
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013131else
Skip Montanaro6dead952003-09-25 14:50:04 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13134$as_echo "no" >&6; }
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13136$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013139
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013140# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013141
Martin v. Löwis11437992002-04-12 09:54:03 +000013142int
13143main ()
13144{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013145
13146 char *name;
13147 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013148 char buffer[2048];
13149 int buflen = 2048;
13150 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013151
Matthias Kloseb159a552010-04-25 21:00:44 +000013152 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013153
13154 ;
13155 return 0;
13156}
13157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Matthias Kloseb159a552010-04-25 21:00:44 +000013163$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13166$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013168else
Skip Montanaro6dead952003-09-25 14:50:04 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13171$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13173$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13175/* end confdefs.h. */
13176
13177# include <netdb.h>
13178
13179int
13180main ()
13181{
13182
13183 char *name;
13184 struct hostent *he;
13185 struct hostent_data data;
13186
13187 (void) gethostbyname_r(name, he, &data);
13188
13189 ;
13190 return 0;
13191}
13192_ACEOF
13193if ac_fn_c_try_compile "$LINENO"; then :
13194
13195 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13196
13197
13198$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13199
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13201$as_echo "yes" >&6; }
13202
13203else
13204
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13206$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216 CFLAGS=$OLD_CFLAGS
13217
13218else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 for ac_func in gethostbyname
13221do :
13222 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013223if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013226_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013228fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013229done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013230
Michael W. Hudson54241132001-12-07 15:38:26 +000013231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013232fi
13233
Michael W. Hudson54241132001-12-07 15:38:26 +000013234
13235
13236
13237
13238
13239
Guido van Rossum627b2d71993-12-24 10:39:16 +000013240# checks for system services
13241# (none yet)
13242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013244ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013245if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013246
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13249$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013250if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013252else
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013254LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258/* Override any GCC internal prototype to avoid an error.
13259 Use char because int might match the return type of a GCC
13260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013261#ifdef __cplusplus
13262extern "C"
13263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013264char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 ;
13270 return 0;
13271}
13272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013278rm -f core conftest.err conftest.$ac_objext \
13279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13283$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013284if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 cat >>confdefs.h <<_ACEOF
13286#define HAVE_LIBIEEE 1
13287_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013289 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291fi
13292
Michael W. Hudson54241132001-12-07 15:38:26 +000013293
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013294fi
13295
Michael W. Hudson54241132001-12-07 15:38:26 +000013296
Guido van Rossum7f253911997-05-09 02:42:48 +000013297# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13299$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013302if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013304if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013305then
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13310$as_echo "yes" >&6; }
13311else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13312$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013313fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317fi
13318
Guido van Rossum7f253911997-05-09 02:42:48 +000013319
Guido van Rossum7f43da71994-08-01 12:15:30 +000013320# check for --with-libm=...
13321
Guido van Rossum563e7081996-09-10 18:20:48 +000013322case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013323Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013324*) LIBM=-lm
13325esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13327$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013332if test "$withval" = no
13333then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13335$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013336elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013337then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13339$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013340else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013341fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013342else
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13344$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345fi
13346
Guido van Rossum7f43da71994-08-01 12:15:30 +000013347
13348# check for --with-libc=...
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13351$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013356if test "$withval" = no
13357then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13359$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013360elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13363$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013364else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013365fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13368$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013369fi
13370
Guido van Rossum7f43da71994-08-01 12:15:30 +000013371
Stefan Krah1919b7e2012-03-21 18:25:23 +010013372# **************************************
13373# * Check for gcc x64 inline assembler *
13374# **************************************
13375
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13377$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13379/* end confdefs.h. */
13380
13381int
13382main ()
13383{
13384
13385 __asm__ __volatile__ ("movq %rcx, %rax");
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
13391if ac_fn_c_try_compile "$LINENO"; then :
13392 have_gcc_asm_for_x64=yes
13393else
13394 have_gcc_asm_for_x64=no
13395fi
13396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13398$as_echo "$have_gcc_asm_for_x64" >&6; }
13399if test "$have_gcc_asm_for_x64" = yes
13400then
13401
13402$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13403
13404fi
13405
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013406# **************************************************
13407# * Check for various properties of floating point *
13408# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13411$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013412if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013414else
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013417 ac_cv_little_endian_double=no
13418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013420/* end confdefs.h. */
13421
13422#include <string.h>
13423int main() {
13424 double x = 9006104071832581.0;
13425 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13426 return 0;
13427 else
13428 return 1;
13429}
13430
13431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013433 ac_cv_little_endian_double=yes
13434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013439fi
13440
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013441fi
13442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13444$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013445if test "$ac_cv_little_endian_double" = yes
13446then
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013449
13450fi
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13453$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013454if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013456else
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013459 ac_cv_big_endian_double=no
13460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013462/* end confdefs.h. */
13463
13464#include <string.h>
13465int main() {
13466 double x = 9006104071832581.0;
13467 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13468 return 0;
13469 else
13470 return 1;
13471}
13472
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013475 ac_cv_big_endian_double=yes
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013481fi
13482
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013483fi
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13486$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013487if test "$ac_cv_big_endian_double" = yes
13488then
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013491
13492fi
13493
13494# Some ARM platforms use a mixed-endian representation for doubles.
13495# While Python doesn't currently have full support for these platforms
13496# (see e.g., issue 1762561), we can at least make sure that float <-> string
13497# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13499$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013500if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013502else
13503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013505 ac_cv_mixed_endian_double=no
13506else
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013508/* end confdefs.h. */
13509
13510#include <string.h>
13511int main() {
13512 double x = 9006104071832581.0;
13513 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13514 return 0;
13515 else
13516 return 1;
13517}
13518
13519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013520if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013521 ac_cv_mixed_endian_double=yes
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013527fi
13528
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013529fi
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13532$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013533if test "$ac_cv_mixed_endian_double" = yes
13534then
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013537
13538fi
13539
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013540# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013541# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013542# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013543# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013544# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013545# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013546
13547# This inline assembler syntax may also work for suncc and icc,
13548# so we try it on all platforms.
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13551$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553/* end confdefs.h. */
13554
13555int
13556main ()
13557{
13558
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013559 unsigned short cw;
13560 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13561 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013562
13563 ;
13564 return 0;
13565}
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013568 have_gcc_asm_for_x87=yes
13569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013571fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13574$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013575if test "$have_gcc_asm_for_x87" = yes
13576then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013579
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13583$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585/* end confdefs.h. */
13586
13587int
13588main ()
13589{
13590
13591 unsigned int fpcr;
13592 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13593 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13594
13595 ;
13596 return 0;
13597}
13598_ACEOF
13599if ac_fn_c_try_compile "$LINENO"; then :
13600 have_gcc_asm_for_mc68881=yes
13601else
13602 have_gcc_asm_for_mc68881=no
13603fi
13604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13606$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13607if test "$have_gcc_asm_for_mc68881" = yes
13608then
13609
13610$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13611
13612fi
13613
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013614# Detect whether system arithmetic is subject to x87-style double
13615# rounding issues. The result of this test has little meaning on non
13616# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13617# mode is round-to-nearest and double rounding issues are present, and
13618# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13620$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013621# $BASECFLAGS may affect the result
13622ac_save_cc="$CC"
13623CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013625 ac_cv_x87_double_rounding=no
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013628/* end confdefs.h. */
13629
13630#include <stdlib.h>
13631#include <math.h>
13632int main() {
13633 volatile double x, y, z;
13634 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13635 x = 0.99999999999999989; /* 1-2**-53 */
13636 y = 1./x;
13637 if (y != 1.)
13638 exit(0);
13639 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13640 x = 1e16;
13641 y = 2.99999;
13642 z = x + y;
13643 if (z != 1e16+4.)
13644 exit(0);
13645 /* both tests show evidence of double rounding */
13646 exit(1);
13647}
13648
13649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013650if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013651 ac_cv_x87_double_rounding=no
13652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013657fi
13658
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013659CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13661$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013662if test "$ac_cv_x87_double_rounding" = yes
13663then
13664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013666
13667fi
13668
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013669# ************************************
13670# * Check for mathematical functions *
13671# ************************************
13672
13673LIBS_SAVE=$LIBS
13674LIBS="$LIBS $LIBM"
13675
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013676for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13677do :
13678 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13679ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013680if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013681 cat >>confdefs.h <<_ACEOF
13682#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13683_ACEOF
13684
13685fi
13686done
13687
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013688for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013689do :
13690 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13691ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013692if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013693 cat >>confdefs.h <<_ACEOF
13694#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13695_ACEOF
13696
13697fi
13698done
13699
13700ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13701"
Victor Stinnere0be4232011-10-25 13:06:09 +020013702if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013703 ac_have_decl=1
13704else
13705 ac_have_decl=0
13706fi
13707
13708cat >>confdefs.h <<_ACEOF
13709#define HAVE_DECL_ISINF $ac_have_decl
13710_ACEOF
13711ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13712"
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013714 ac_have_decl=1
13715else
13716 ac_have_decl=0
13717fi
13718
13719cat >>confdefs.h <<_ACEOF
13720#define HAVE_DECL_ISNAN $ac_have_decl
13721_ACEOF
13722ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13723"
Victor Stinnere0be4232011-10-25 13:06:09 +020013724if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013725 ac_have_decl=1
13726else
13727 ac_have_decl=0
13728fi
13729
13730cat >>confdefs.h <<_ACEOF
13731#define HAVE_DECL_ISFINITE $ac_have_decl
13732_ACEOF
13733
13734
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013735# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13736# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13738$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013739if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013741else
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013744 ac_cv_tanh_preserves_zero_sign=no
13745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013747/* end confdefs.h. */
13748
13749#include <math.h>
13750#include <stdlib.h>
13751int main() {
13752 /* return 0 if either negative zeros don't exist
13753 on this platform or if negative zeros exist
13754 and tanh(-0.) == -0. */
13755 if (atan2(0., -1.) == atan2(-0., -1.) ||
13756 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13757 else exit(1);
13758}
13759
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013762 ac_cv_tanh_preserves_zero_sign=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013768fi
13769
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013770fi
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13773$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013774if test "$ac_cv_tanh_preserves_zero_sign" = yes
13775then
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013778
13779fi
13780
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013781if test "$ac_cv_func_log1p" = yes
13782then
13783 # On some versions of AIX, log1p(-0.) returns 0. instead of
13784 # -0. See issue #9920.
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13786$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013787 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013788 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013789else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013790
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013791 if test "$cross_compiling" = yes; then :
13792 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013793else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013796
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013797 #include <math.h>
13798 #include <stdlib.h>
13799 int main() {
13800 /* Fail if the signs of log1p(-0.) and -0. can be
13801 distinguished. */
13802 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13803 return 0;
13804 else
13805 return 1;
13806 }
13807
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013808_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013809if ac_fn_c_try_run "$LINENO"; then :
13810 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013811else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013812 ac_cv_log1p_drops_zero_sign=yes
13813fi
13814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013816fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013817
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013818fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013819
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13821$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13822fi
13823if test "$ac_cv_log1p_drops_zero_sign" = yes
13824then
13825
13826$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13827
13828fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013829
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013830LIBS=$LIBS_SAVE
13831
Mark Dickinsona614f042009-11-28 12:48:43 +000013832# For multiprocessing module, check that sem_open
13833# actually works. For FreeBSD versions <= 7.2,
13834# the kernel module that provides POSIX semaphores
13835# isn't loaded by default, so an attempt to call
13836# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13838$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013839if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013843 ac_cv_posix_semaphores_enabled=yes
13844else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013846/* end confdefs.h. */
13847
13848#include <unistd.h>
13849#include <fcntl.h>
13850#include <stdio.h>
13851#include <semaphore.h>
13852#include <sys/stat.h>
13853
13854int main(void) {
13855 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13856 if (a == SEM_FAILED) {
13857 perror("sem_open");
13858 return 1;
13859 }
13860 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013861 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013862 return 0;
13863}
13864
13865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013867 ac_cv_posix_semaphores_enabled=yes
13868else
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013873fi
13874
13875
Mark Dickinsona614f042009-11-28 12:48:43 +000013876fi
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13879$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013880if test $ac_cv_posix_semaphores_enabled = no
13881then
13882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013884
13885fi
13886
Mark Dickinson10683072009-04-18 21:18:19 +000013887# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13889$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013890if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013894 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013897/* end confdefs.h. */
13898
13899#include <unistd.h>
13900#include <fcntl.h>
13901#include <stdio.h>
13902#include <semaphore.h>
13903#include <sys/stat.h>
13904
13905int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013906 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013907 int count;
13908 int res;
13909 if(a==SEM_FAILED){
13910 perror("sem_open");
13911 return 1;
13912
13913 }
13914 res = sem_getvalue(a, &count);
13915 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013916 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013917 return res==-1 ? 1 : 0;
13918}
13919
Mark Dickinson10683072009-04-18 21:18:19 +000013920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013928fi
13929
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013931fi
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13934$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013935if test $ac_cv_broken_sem_getvalue = yes
13936then
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013939
13940fi
13941
Mark Dickinsonbd792642009-03-18 20:06:12 +000013942# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13944$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013945# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013947 enableval=$enable_big_digits; case $enable_big_digits in
13948yes)
13949 enable_big_digits=30 ;;
13950no)
13951 enable_big_digits=15 ;;
1395215|30)
13953 ;;
13954*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013955 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 +000013956esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13958$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013959
13960cat >>confdefs.h <<_ACEOF
13961#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13962_ACEOF
13963
13964
13965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13967$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013968fi
13969
13970
Guido van Rossumef2255b2000-03-10 22:30:29 +000013971# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013972ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013973if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
13975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013978 wchar_h="yes"
13979
Guido van Rossumef2255b2000-03-10 22:30:29 +000013980else
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013982
13983fi
13984
Michael W. Hudson54241132001-12-07 15:38:26 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013987# determine wchar_t size
13988if test "$wchar_h" = yes
13989then
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13995$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013996if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14000"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002else
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 if test "$ac_cv_type_wchar_t" = yes; then
14004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014006as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014007See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 else
14009 ac_cv_sizeof_wchar_t=0
14010 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14015$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016
14017
14018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014020#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014021_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014022
Michael W. Hudson54241132001-12-07 15:38:26 +000014023
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014024fi
14025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14027$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014028have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014031
14032#include <tcl.h>
14033#if TCL_UTF_MAX != 6
14034# error "NOT UCS4_TCL"
14035#endif
14036int
14037main ()
14038{
14039
14040 ;
14041 return 0;
14042}
14043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014045
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014048
14049 have_ucs4_tcl=yes
14050
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14054$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014055
Skip Montanaro6dead952003-09-25 14:50:04 +000014056# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014057if test "$wchar_h" = yes
14058then
14059 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14061$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014062 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014064else
14065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014067 ac_cv_wchar_t_signed=yes
14068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014070/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014071
14072 #include <wchar.h>
14073 int main()
14074 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014075 /* Success: exit code 0 */
14076 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014077 }
14078
14079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014080if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014081 ac_cv_wchar_t_signed=yes
14082else
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014087fi
14088
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014089fi
14090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14092$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093fi
14094
Georg Brandl52d168a2008-01-07 18:10:24 +000014095# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014096if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014097 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014098then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014099 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
Georg Brandl52d168a2008-01-07 18:10:24 +000014103else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014104 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014105fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14107$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014108
14109# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14111$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014114else
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 ac_cv_c_bigendian=unknown
14116 # See if we're dealing with a universal compiler.
14117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14118/* end confdefs.h. */
14119#ifndef __APPLE_CC__
14120 not a universal capable compiler
14121 #endif
14122 typedef int dummy;
14123
Skip Montanaro6dead952003-09-25 14:50:04 +000014124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014125if ac_fn_c_try_compile "$LINENO"; then :
14126
14127 # Check for potential -arch flags. It is not universal unless
14128 # there are at least two -arch flags with different values.
14129 ac_arch=
14130 ac_prev=
14131 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14132 if test -n "$ac_prev"; then
14133 case $ac_word in
14134 i?86 | x86_64 | ppc | ppc64)
14135 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14136 ac_arch=$ac_word
14137 else
14138 ac_cv_c_bigendian=universal
14139 break
14140 fi
14141 ;;
14142 esac
14143 ac_prev=
14144 elif test "x$ac_word" = "x-arch"; then
14145 ac_prev=arch
14146 fi
14147 done
14148fi
14149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14150 if test $ac_cv_c_bigendian = unknown; then
14151 # See if sys/param.h defines the BYTE_ORDER macro.
14152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014153/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014154#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157int
14158main ()
14159{
Matthias Kloseb9621712010-04-24 17:59:49 +000014160#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14161 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14162 && LITTLE_ENDIAN)
14163 bogus endian macros
14164 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
14166 ;
14167 return 0;
14168}
14169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014170if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014171 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014173/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014174#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014176
Martin v. Löwis11437992002-04-12 09:54:03 +000014177int
14178main ()
14179{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014180#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 not big endian
14182 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
14184 ;
14185 return 0;
14186}
14187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014189 ac_cv_c_bigendian=yes
14190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014194fi
14195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14196 fi
14197 if test $ac_cv_c_bigendian = unknown; then
14198 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014200/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014201#include <limits.h>
14202
Martin v. Löwis11437992002-04-12 09:54:03 +000014203int
14204main ()
14205{
Matthias Kloseb9621712010-04-24 17:59:49 +000014206#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14207 bogus endian macros
14208 #endif
14209
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 ;
14211 return 0;
14212}
14213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014214if ac_fn_c_try_compile "$LINENO"; then :
14215 # It does; now see whether it defined to _BIG_ENDIAN or not.
14216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217/* end confdefs.h. */
14218#include <limits.h>
14219
14220int
14221main ()
14222{
14223#ifndef _BIG_ENDIAN
14224 not big endian
14225 #endif
14226
14227 ;
14228 return 0;
14229}
14230_ACEOF
14231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014233else
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237fi
14238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14239 fi
14240 if test $ac_cv_c_bigendian = unknown; then
14241 # Compile a test program.
14242 if test "$cross_compiling" = yes; then :
14243 # Try to guess by grepping values from an object file.
14244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14245/* end confdefs.h. */
14246short int ascii_mm[] =
14247 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14248 short int ascii_ii[] =
14249 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14250 int use_ascii (int i) {
14251 return ascii_mm[i] + ascii_ii[i];
14252 }
14253 short int ebcdic_ii[] =
14254 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14255 short int ebcdic_mm[] =
14256 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14257 int use_ebcdic (int i) {
14258 return ebcdic_mm[i] + ebcdic_ii[i];
14259 }
14260 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262int
14263main ()
14264{
14265return use_ascii (foo) == use_ebcdic (foo);
14266 ;
14267 return 0;
14268}
14269_ACEOF
14270if ac_fn_c_try_compile "$LINENO"; then :
14271 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14272 ac_cv_c_bigendian=yes
14273 fi
14274 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14275 if test "$ac_cv_c_bigendian" = unknown; then
14276 ac_cv_c_bigendian=no
14277 else
14278 # finding both strings is unlikely to happen, but who knows?
14279 ac_cv_c_bigendian=unknown
14280 fi
14281 fi
14282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014288int
14289main ()
14290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 /* Are we little or big endian? From Harbison&Steele. */
14293 union
14294 {
14295 long int l;
14296 char c[sizeof (long int)];
14297 } u;
14298 u.l = 1;
14299 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300
14301 ;
14302 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303}
Martin v. Löwis11437992002-04-12 09:54:03 +000014304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306 ac_cv_c_bigendian=no
14307else
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14317$as_echo "$ac_cv_c_bigendian" >&6; }
14318 case $ac_cv_c_bigendian in #(
14319 yes)
14320 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14321;; #(
14322 no)
14323 ;; #(
14324 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 ;; #(
14329 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014330 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014331 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014333
Michael W. Hudson54241132001-12-07 15:38:26 +000014334
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014335# ABI version string for Python extension modules. This appears between the
14336# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14337# from the following attributes which affect the ABI of this Python build (in
14338# this order):
14339#
14340# * The Python implementation (always 'cpython-' for us)
14341# * The major and minor version numbers
14342# * --with-pydebug (adds a 'd')
14343# * --with-pymalloc (adds a 'm')
14344# * --with-wide-unicode (adds a 'u')
14345#
14346# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014347# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14348# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014349
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14351$as_echo_n "checking ABIFLAGS... " >&6; }
14352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14353$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14355$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014356SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14358$as_echo "$SOABI" >&6; }
14359
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014360
14361case $ac_sys_system in
14362 Linux*|GNU*)
14363 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14364 *)
14365 EXT_SUFFIX=${SHLIB_SUFFIX};;
14366esac
14367
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14369$as_echo_n "checking LDVERSION... " >&6; }
14370LDVERSION='$(VERSION)$(ABIFLAGS)'
14371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14372$as_echo "$LDVERSION" >&6; }
14373
doko@python.org87421192013-01-26 11:39:31 +010014374
14375LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14376
14377
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014378# Check whether right shifting a negative integer extends the sign bit
14379# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14381$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014382if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
Matthias Kloseb9621712010-04-24 17:59:49 +000014386if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014387 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014390/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014391
14392int main()
14393{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014394 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014395}
14396
Martin v. Löwis11437992002-04-12 09:54:03 +000014397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014399 ac_cv_rshift_extends_sign=yes
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014405fi
14406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407fi
14408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14410$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014411if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014412then
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014415
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014416fi
14417
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014418# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14420$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014421if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014423else
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014427#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014428int
14429main ()
14430{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014431
14432 FILE *f = fopen("/dev/null", "r");
14433 flockfile(f);
14434 getc_unlocked(f);
14435 funlockfile(f);
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014442 ac_cv_have_getc_unlocked=yes
14443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_have_getc_unlocked=no
14445fi
14446rm -f core conftest.err conftest.$ac_objext \
14447 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14451$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014452if test "$ac_cv_have_getc_unlocked" = yes
14453then
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014456
14457fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014458
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014459# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014460# save the value of LIBS so we don't actually link Python with readline
14461LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014462
Gregory P. Smith18820942008-09-07 06:24:49 +000014463# On some systems we need to link readline to a termcap compatible
14464# library. NOTE: Keep the precedence of listed libraries synchronised
14465# with setup.py.
14466py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14468$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014469for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014470 if test -z "$py_libtermcap"; then
14471 READLINE_LIBS="-lreadline"
14472 else
14473 READLINE_LIBS="-lreadline -l$py_libtermcap"
14474 fi
14475 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014477/* end confdefs.h. */
14478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479/* Override any GCC internal prototype to avoid an error.
14480 Use char because int might match the return type of a GCC
14481 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014482#ifdef __cplusplus
14483extern "C"
14484#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014485char readline ();
14486int
14487main ()
14488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014490 ;
14491 return 0;
14492}
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014495 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014497rm -f core conftest.err conftest.$ac_objext \
14498 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014499 if test $py_cv_lib_readline = yes; then
14500 break
14501 fi
14502done
14503# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14504#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014505if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14507$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014508else
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14510$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014513
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014514fi
14515
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014516# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14518$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014519if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014521else
14522 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014523LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014525/* end confdefs.h. */
14526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527/* Override any GCC internal prototype to avoid an error.
14528 Use char because int might match the return type of a GCC
14529 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014530#ifdef __cplusplus
14531extern "C"
14532#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014533char rl_callback_handler_install ();
14534int
14535main ()
14536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014538 ;
14539 return 0;
14540}
14541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014542if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014543 ac_cv_lib_readline_rl_callback_handler_install=yes
14544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014547rm -f core conftest.err conftest.$ac_objext \
14548 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014549LIBS=$ac_check_lib_save_LIBS
14550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14552$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014553if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014556
14557fi
14558
14559
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014560# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014562/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014563#include <readline/readline.h>
14564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014566 have_readline=yes
14567else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014568 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014569
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014570fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014571rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014572if test $have_readline = yes
14573then
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014575/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014576#include <readline/readline.h>
14577
14578_ACEOF
14579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014583
14584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014585rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014588/* end confdefs.h. */
14589#include <readline/readline.h>
14590
14591_ACEOF
14592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014596
14597fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014598rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014599
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014600fi
14601
Martin v. Löwis0daad592001-09-30 21:09:59 +000014602# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14604$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014605if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014607else
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014609LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613/* Override any GCC internal prototype to avoid an error.
14614 Use char because int might match the return type of a GCC
14615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014616#ifdef __cplusplus
14617extern "C"
14618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014619char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014620int
14621main ()
14622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 ;
14625 return 0;
14626}
14627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014630else
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014633rm -f core conftest.err conftest.$ac_objext \
14634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014635LIBS=$ac_check_lib_save_LIBS
14636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14638$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014639if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014642
Martin v. Löwis0daad592001-09-30 21:09:59 +000014643fi
14644
Michael W. Hudson54241132001-12-07 15:38:26 +000014645
Thomas Wouters89d996e2007-09-08 17:39:28 +000014646# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14648$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014649if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014651else
14652 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014653LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014655/* end confdefs.h. */
14656
14657/* Override any GCC internal prototype to avoid an error.
14658 Use char because int might match the return type of a GCC
14659 builtin and then its argument prototype would still apply. */
14660#ifdef __cplusplus
14661extern "C"
14662#endif
14663char rl_completion_display_matches_hook ();
14664int
14665main ()
14666{
14667return rl_completion_display_matches_hook ();
14668 ;
14669 return 0;
14670}
14671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014672if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014673 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14674else
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014677rm -f core conftest.err conftest.$ac_objext \
14678 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014679LIBS=$ac_check_lib_save_LIBS
14680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14682$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014683if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014686
14687fi
14688
14689
Martin v. Löwis0daad592001-09-30 21:09:59 +000014690# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14692$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014693if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014695else
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014697LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701/* Override any GCC internal prototype to avoid an error.
14702 Use char because int might match the return type of a GCC
14703 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014704#ifdef __cplusplus
14705extern "C"
14706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014707char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014708int
14709main ()
14710{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 ;
14713 return 0;
14714}
14715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014721rm -f core conftest.err conftest.$ac_objext \
14722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014723LIBS=$ac_check_lib_save_LIBS
14724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14726$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014727if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014730
Guido van Rossum353ae582001-07-10 16:45:32 +000014731fi
14732
Jack Jansendd19cf82001-12-06 22:36:17 +000014733
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014734# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736/* end confdefs.h. */
14737#include <readline/readline.h>
14738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014739if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014740 have_readline=yes
14741else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014742 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014743
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014745rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014746if test $have_readline = yes
14747then
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014749/* end confdefs.h. */
14750#include <readline/readline.h>
14751
14752_ACEOF
14753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014757
14758fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014759rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014760
14761fi
14762
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14764$as_echo_n "checking for append_history in -lreadline... " >&6; }
14765if ${ac_cv_lib_readline_append_history+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767else
14768 ac_check_lib_save_LIBS=$LIBS
14769LIBS="-lreadline $READLINE_LIBS $LIBS"
14770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771/* end confdefs.h. */
14772
14773/* Override any GCC internal prototype to avoid an error.
14774 Use char because int might match the return type of a GCC
14775 builtin and then its argument prototype would still apply. */
14776#ifdef __cplusplus
14777extern "C"
14778#endif
14779char append_history ();
14780int
14781main ()
14782{
14783return append_history ();
14784 ;
14785 return 0;
14786}
14787_ACEOF
14788if ac_fn_c_try_link "$LINENO"; then :
14789 ac_cv_lib_readline_append_history=yes
14790else
14791 ac_cv_lib_readline_append_history=no
14792fi
14793rm -f core conftest.err conftest.$ac_objext \
14794 conftest$ac_exeext conftest.$ac_ext
14795LIBS=$ac_check_lib_save_LIBS
14796fi
14797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14798$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14799if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14800
14801$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14802
14803fi
14804
14805
Martin v. Löwis82bca632006-02-10 20:49:30 +000014806# End of readline checks: restore LIBS
14807LIBS=$LIBS_no_readline
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14810$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014811if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014813else
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014816 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014817else
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014819/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014820
14821int main()
14822{
14823 int val1 = nice(1);
14824 if (val1 != -1 && val1 == nice(2))
14825 exit(0);
14826 exit(1);
14827}
14828
Martin v. Löwis11437992002-04-12 09:54:03 +000014829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014831 ac_cv_broken_nice=yes
14832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014837fi
14838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839fi
14840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14842$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014843if test "$ac_cv_broken_nice" = yes
14844then
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014847
14848fi
14849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14851$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014852if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014854else
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014856 ac_cv_broken_poll=no
14857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014859/* end confdefs.h. */
14860
14861#include <poll.h>
14862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014863int main()
14864{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014865 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014866 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014867
14868 close (42);
14869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014870 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014871 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014872 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014873 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014874 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014875 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876 return 1;
14877}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014878
14879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014880if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014881 ac_cv_broken_poll=yes
14882else
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014889fi
14890
Matthias Kloseb9621712010-04-24 17:59:49 +000014891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14892$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014893if test "$ac_cv_broken_poll" = yes
14894then
14895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014897
14898fi
14899
Brett Cannon43802422005-02-10 20:48:03 +000014900# 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 +000014901# (which is not required by ISO C or UNIX spec) and/or if we support
14902# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014903ac_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 +000014904#include <$ac_cv_struct_tm>
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906"
Victor Stinnere0be4232011-10-25 13:06:09 +020014907if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014908
14909cat >>confdefs.h <<_ACEOF
14910#define HAVE_STRUCT_TM_TM_ZONE 1
14911_ACEOF
14912
14913
14914fi
14915
14916if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014919
14920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14922"
Victor Stinnere0be4232011-10-25 13:06:09 +020014923if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925else
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927fi
14928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014930#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931_ACEOF
14932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14934$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014935if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014939/* end confdefs.h. */
14940#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941#if !HAVE_DECL_TZNAME
14942extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014943#endif
14944
14945int
14946main ()
14947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014949 ;
14950 return 0;
14951}
14952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014953if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014954 ac_cv_var_tzname=yes
14955else
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014958rm -f core conftest.err conftest.$ac_objext \
14959 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14962$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014963 if test $ac_cv_var_tzname = yes; then
14964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014966
14967 fi
14968fi
14969
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014970
Martin v. Löwis1d459062005-03-14 21:23:33 +000014971# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14973$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014974if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014976else
14977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014979 ac_cv_working_tzset=no
14980else
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014982/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014983
14984#include <stdlib.h>
14985#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014986#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014987
14988#if HAVE_TZNAME
14989extern char *tzname[];
14990#endif
14991
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014992int main()
14993{
Brett Cannon18367812003-09-19 00:59:16 +000014994 /* Note that we need to ensure that not only does tzset(3)
14995 do 'something' with localtime, but it works as documented
14996 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014997 This includes making sure that tzname is set properly if
14998 tm->tm_zone does not exist since it is the alternative way
14999 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015000
15001 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015002 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015003 */
15004
Martin v. Löwis1d459062005-03-14 21:23:33 +000015005 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015006 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15007
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015008 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015009 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015010 if (localtime(&groundhogday)->tm_hour != 0)
15011 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015012#if HAVE_TZNAME
15013 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15014 if (strcmp(tzname[0], "UTC") ||
15015 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15016 exit(1);
15017#endif
Brett Cannon18367812003-09-19 00:59:16 +000015018
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015019 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015020 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015021 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015022 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015023#if HAVE_TZNAME
15024 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15025 exit(1);
15026#endif
Brett Cannon18367812003-09-19 00:59:16 +000015027
15028 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15029 tzset();
15030 if (localtime(&groundhogday)->tm_hour != 11)
15031 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015032#if HAVE_TZNAME
15033 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15034 exit(1);
15035#endif
15036
15037#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015038 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15039 exit(1);
15040 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15041 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015042#endif
Brett Cannon18367812003-09-19 00:59:16 +000015043
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015044 exit(0);
15045}
15046
15047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015048if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015049 ac_cv_working_tzset=yes
15050else
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015055fi
15056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057fi
15058
Matthias Kloseb9621712010-04-24 17:59:49 +000015059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15060$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015061if test "$ac_cv_working_tzset" = yes
15062then
15063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015065
15066fi
15067
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015068# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15070$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015071if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015073else
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015075/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015076#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015077int
15078main ()
15079{
15080
15081struct stat st;
15082st.st_mtim.tv_nsec = 1;
15083
15084 ;
15085 return 0;
15086}
15087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015089 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015090else
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15094fi
15095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15097$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015098if test "$ac_cv_stat_tv_nsec" = yes
15099then
15100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015102
15103fi
15104
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015105# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15107$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015108if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015112/* end confdefs.h. */
15113#include <sys/stat.h>
15114int
15115main ()
15116{
15117
15118struct stat st;
15119st.st_mtimespec.tv_nsec = 1;
15120
15121 ;
15122 return 0;
15123}
15124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015126 ac_cv_stat_tv_nsec2=yes
15127else
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15131fi
15132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15134$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015135if test "$ac_cv_stat_tv_nsec2" = yes
15136then
15137
Matthias Kloseb9621712010-04-24 17:59:49 +000015138$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015139
15140fi
15141
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015142# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015143ac_save_cppflags="$CPPFLAGS"
15144CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015145
15146for ac_header in curses.h ncurses.h
15147do :
15148 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15149ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15150if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15151 cat >>confdefs.h <<_ACEOF
15152#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15153_ACEOF
15154
15155fi
15156
15157done
15158
15159
15160# On Solaris, term.h requires curses.h
15161for ac_header in term.h
15162do :
15163 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15164#ifdef HAVE_CURSES_H
15165#include <curses.h>
15166#endif
15167
15168"
15169if test "x$ac_cv_header_term_h" = xyes; then :
15170 cat >>confdefs.h <<_ACEOF
15171#define HAVE_TERM_H 1
15172_ACEOF
15173
15174fi
15175
15176done
15177
15178
Jack Jansen666b1e72001-10-31 12:11:48 +000015179# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15181$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015182if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015187#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015188int
15189main ()
15190{
Jack Jansen666b1e72001-10-31 12:11:48 +000015191
15192 int rtn;
15193 rtn = mvwdelch(0,0,0);
15194
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;
15196 return 0;
15197}
15198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015199if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015200 ac_cv_mvwdelch_is_expression=yes
15201else
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15205fi
15206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15208$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015209
15210if test "$ac_cv_mvwdelch_is_expression" = yes
15211then
Martin v. Löwis11437992002-04-12 09:54:03 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015214
15215fi
15216
Matthias Kloseb9621712010-04-24 17:59:49 +000015217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15218$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015219if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015221else
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015223/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015224#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015225int
15226main ()
15227{
Jack Jansen666b1e72001-10-31 12:11:48 +000015228
15229 WINDOW *w;
15230 w->_flags = 0;
15231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ;
15233 return 0;
15234}
15235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015236if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015237 ac_cv_window_has_flags=yes
15238else
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15242fi
15243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15245$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015246
Jack Jansen666b1e72001-10-31 12:11:48 +000015247
15248if test "$ac_cv_window_has_flags" = yes
15249then
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015252
15253fi
15254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15256$as_echo_n "checking for is_term_resized... " >&6; }
15257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015258/* end confdefs.h. */
15259#include <curses.h>
15260int
15261main ()
15262{
15263void *x=is_term_resized
15264 ;
15265 return 0;
15266}
15267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015271
Matthias Kloseb159a552010-04-25 21:00:44 +000015272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015273$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015274else
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15276$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015277
15278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15280
Matthias Kloseb9621712010-04-24 17:59:49 +000015281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15282$as_echo_n "checking for resize_term... " >&6; }
15283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015284/* end confdefs.h. */
15285#include <curses.h>
15286int
15287main ()
15288{
15289void *x=resize_term
15290 ;
15291 return 0;
15292}
15293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015294if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015297
Matthias Kloseb159a552010-04-25 21:00:44 +000015298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015299$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015300else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15302$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015303
15304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15308$as_echo_n "checking for resizeterm... " >&6; }
15309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015310/* end confdefs.h. */
15311#include <curses.h>
15312int
15313main ()
15314{
15315void *x=resizeterm
15316 ;
15317 return 0;
15318}
15319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015320if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015323
Matthias Kloseb159a552010-04-25 21:00:44 +000015324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015325$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15328$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015329
15330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015332# last curses configure check
15333CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15336$as_echo "$as_me: checking for device files" >&6;}
15337
15338if test "x$cross_compiling" = xyes; then
15339 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15341$as_echo_n "checking for /dev/ptmx... " >&6; }
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15343$as_echo "not set" >&6; }
15344 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15345 fi
15346 if test "${ac_cv_file__dev_ptc+set}" != set; then
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15348$as_echo_n "checking for /dev/ptc... " >&6; }
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15350$as_echo "not set" >&6; }
15351 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15352 fi
15353fi
15354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15356$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015357if ${ac_cv_file__dev_ptmx+:} false; then :
15358 $as_echo_n "(cached) " >&6
15359else
15360 test "$cross_compiling" = yes &&
15361 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15362if test -r "/dev/ptmx"; then
15363 ac_cv_file__dev_ptmx=yes
15364else
15365 ac_cv_file__dev_ptmx=no
15366fi
15367fi
15368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15369$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15370if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015371
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015372fi
15373
15374if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015377
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15380$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015381if ${ac_cv_file__dev_ptc+:} false; then :
15382 $as_echo_n "(cached) " >&6
15383else
15384 test "$cross_compiling" = yes &&
15385 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15386if test -r "/dev/ptc"; then
15387 ac_cv_file__dev_ptc=yes
15388else
15389 ac_cv_file__dev_ptc=no
15390fi
15391fi
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15393$as_echo "$ac_cv_file__dev_ptc" >&6; }
15394if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015395
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015396fi
15397
15398if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015401
Neal Norwitz865400f2003-03-21 01:42:58 +000015402fi
15403
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015404if test "$have_long_long" = yes
15405then
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15407$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015408 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015410else
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015412 ac_cv_have_long_long_format="cross -- assuming no"
15413 if test x$GCC = xyes; then
15414 save_CFLAGS=$CFLAGS
15415 CFLAGS="$CFLAGS -Werror -Wformat"
15416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417/* end confdefs.h. */
15418
15419 #include <stdio.h>
15420 #include <stddef.h>
15421
15422int
15423main ()
15424{
15425
15426 char *buffer;
15427 sprintf(buffer, "%lld", (long long)123);
15428 sprintf(buffer, "%lld", (long long)-123);
15429 sprintf(buffer, "%llu", (unsigned long long)123);
15430
15431 ;
15432 return 0;
15433}
15434_ACEOF
15435if ac_fn_c_try_compile "$LINENO"; then :
15436 ac_cv_have_long_long_format=yes
15437
15438fi
15439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15440 CFLAGS=$save_CFLAGS
15441 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015444/* end confdefs.h. */
15445
15446 #include <stdio.h>
15447 #include <stddef.h>
15448 #include <string.h>
15449
15450 #ifdef HAVE_SYS_TYPES_H
15451 #include <sys/types.h>
15452 #endif
15453
15454 int main()
15455 {
15456 char buffer[256];
15457
15458 if (sprintf(buffer, "%lld", (long long)123) < 0)
15459 return 1;
15460 if (strcmp(buffer, "123"))
15461 return 1;
15462
15463 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15464 return 1;
15465 if (strcmp(buffer, "-123"))
15466 return 1;
15467
15468 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15469 return 1;
15470 if (strcmp(buffer, "123"))
15471 return 1;
15472
15473 return 0;
15474 }
15475
15476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015477if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015478 ac_cv_have_long_long_format=yes
15479else
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15483 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015484fi
15485
15486
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015487fi
15488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15490$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015491fi
15492
Mark Dickinson89d7d412009-12-31 20:50:59 +000015493if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015494then
15495
Matthias Kloseb9621712010-04-24 17:59:49 +000015496$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015497
15498fi
15499
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015500if test $ac_sys_system = Darwin
15501then
15502 LIBS="$LIBS -framework CoreFoundation"
15503fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15506$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015507if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015509else
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015511 ac_cv_have_size_t_format="cross -- assuming yes"
15512
Thomas Wouters477c8d52006-05-27 19:21:47 +000015513else
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015515/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015516
Thomas Wouters477c8d52006-05-27 19:21:47 +000015517#include <stdio.h>
15518#include <stddef.h>
15519#include <string.h>
15520
Christian Heimes2c181612007-12-17 20:04:13 +000015521#ifdef HAVE_SYS_TYPES_H
15522#include <sys/types.h>
15523#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015524
15525#ifdef HAVE_SSIZE_T
15526typedef ssize_t Py_ssize_t;
15527#elif SIZEOF_VOID_P == SIZEOF_LONG
15528typedef long Py_ssize_t;
15529#else
15530typedef int Py_ssize_t;
15531#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015532
Christian Heimes2c181612007-12-17 20:04:13 +000015533int main()
15534{
15535 char buffer[256];
15536
Thomas Wouters477c8d52006-05-27 19:21:47 +000015537 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15538 return 1;
15539
Thomas Wouters89f507f2006-12-13 04:49:30 +000015540 if (strcmp(buffer, "123"))
15541 return 1;
15542
15543 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15544 return 1;
15545
15546 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015547 return 1;
15548
15549 return 0;
15550}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015551
Thomas Wouters477c8d52006-05-27 19:21:47 +000015552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015554 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015560fi
15561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15564$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015565if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015568
15569fi
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015572#ifdef HAVE_SYS_TYPES_H
15573#include <sys/types.h>
15574#endif
15575#ifdef HAVE_SYS_SOCKET_H
15576#include <sys/socket.h>
15577#endif
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579"
Victor Stinnere0be4232011-10-25 13:06:09 +020015580if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015581
Martin v. Löwis11437992002-04-12 09:54:03 +000015582else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015585
15586fi
15587
Michael W. Hudson54241132001-12-07 15:38:26 +000015588
Matthias Kloseb9621712010-04-24 17:59:49 +000015589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15590$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015591if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015593else
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015595 ac_cv_broken_mbstowcs=no
15596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015598/* end confdefs.h. */
15599
Stefan Krah19c21392012-11-22 23:47:32 +010015600#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015601#include<stdlib.h>
15602int main() {
15603 size_t len = -1;
15604 const char *str = "text";
15605 len = mbstowcs(NULL, str, 0);
15606 return (len != 4);
15607}
15608
15609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015610if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015611 ac_cv_broken_mbstowcs=no
15612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015617fi
15618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015619fi
15620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15622$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015623if test "$ac_cv_broken_mbstowcs" = yes
15624then
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015627
15628fi
15629
Antoine Pitroub52ec782009-01-25 16:34:23 +000015630# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15632$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015633
15634# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015635if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015636 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015637if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015638then
15639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15643$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015644fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015645if test "$withval" = no
15646then
15647
15648$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15651$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015652fi
15653
Antoine Pitrou042b1282010-08-13 21:15:58 +000015654else
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15656$as_echo "no value specified" >&6; }
15657fi
15658
Antoine Pitroub52ec782009-01-25 16:34:23 +000015659
Matthias Kloseb17289e2012-03-15 19:51:34 +010015660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15661$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15662if ${ac_cv_computed_gotos+:} false; then :
15663 $as_echo_n "(cached) " >&6
15664else
15665 if test "$cross_compiling" = yes; then :
15666 if test "${with_computed_gotos+set}" = set; then
15667 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15668 else
15669 ac_cv_computed_gotos=no
15670 fi
15671else
15672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15673/* end confdefs.h. */
15674
15675int main(int argc, char **argv)
15676{
15677 static void *targets[1] = { &&LABEL1 };
15678 goto LABEL2;
15679LABEL1:
15680 return 0;
15681LABEL2:
15682 goto *targets[0];
15683 return 1;
15684}
15685
15686_ACEOF
15687if ac_fn_c_try_run "$LINENO"; then :
15688 ac_cv_computed_gotos=yes
15689else
15690 ac_cv_computed_gotos=no
15691fi
15692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15693 conftest.$ac_objext conftest.beam conftest.$ac_ext
15694fi
15695
15696fi
15697
15698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15699$as_echo "$ac_cv_computed_gotos" >&6; }
15700case "$ac_cv_computed_gotos" in yes*)
15701
15702$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15703
15704esac
15705
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015706case $ac_sys_system in
15707AIX*)
15708
15709$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15710 ;;
15711esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015712
Michael W. Hudson54241132001-12-07 15:38:26 +000015713
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015714
15715
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015716for h in `(cd $srcdir;echo Python/thread_*.h)`
15717do
15718 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15719done
15720
Michael W. Hudson54241132001-12-07 15:38:26 +000015721
Ned Deily0db50cf2014-07-25 12:41:31 -070015722SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15724$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015725for dir in $SRCDIRS; do
15726 if test ! -d $dir; then
15727 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015728 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015729done
Matthias Kloseb9621712010-04-24 17:59:49 +000015730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15731$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015732
Stefan Krah1919b7e2012-03-21 18:25:23 +010015733# Availability of -O2:
15734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15735$as_echo_n "checking for -O2... " >&6; }
15736saved_cflags="$CFLAGS"
15737CFLAGS="-O2"
15738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739/* end confdefs.h. */
15740
15741int
15742main ()
15743{
15744
15745
15746 ;
15747 return 0;
15748}
15749_ACEOF
15750if ac_fn_c_try_compile "$LINENO"; then :
15751 have_O2=yes
15752else
15753 have_O2=no
15754fi
15755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15757$as_echo "$have_O2" >&6; }
15758CFLAGS="$saved_cflags"
15759
15760# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15761# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15763$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15764saved_cflags="$CFLAGS"
15765CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15766if test "$have_O2" = no; then
15767 CFLAGS=""
15768fi
15769if test "$cross_compiling" = yes; then :
15770 have_glibc_memmove_bug=undefined
15771else
15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773/* end confdefs.h. */
15774
15775#include <stdio.h>
15776#include <stdlib.h>
15777#include <string.h>
15778void foo(void *p, void *q) { memmove(p, q, 19); }
15779int main() {
15780 char a[32] = "123456789000000000";
15781 foo(&a[9], a);
15782 if (strcmp(a, "123456789123456789000000000") != 0)
15783 return 1;
15784 foo(a, &a[9]);
15785 if (strcmp(a, "123456789000000000") != 0)
15786 return 1;
15787 return 0;
15788}
15789
15790_ACEOF
15791if ac_fn_c_try_run "$LINENO"; then :
15792 have_glibc_memmove_bug=no
15793else
15794 have_glibc_memmove_bug=yes
15795fi
15796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15797 conftest.$ac_objext conftest.beam conftest.$ac_ext
15798fi
15799
15800CFLAGS="$saved_cflags"
15801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15802$as_echo "$have_glibc_memmove_bug" >&6; }
15803if test "$have_glibc_memmove_bug" = yes; then
15804
15805$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15806
15807fi
15808
15809if test "$have_gcc_asm_for_x87" = yes; then
15810 # Some versions of gcc miscompile inline asm:
15811 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15812 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15813 case $CC in
15814 *gcc*)
15815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15816$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15817 saved_cflags="$CFLAGS"
15818 CFLAGS="-O2"
15819 if test "$cross_compiling" = yes; then :
15820 have_ipa_pure_const_bug=undefined
15821else
15822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15823/* end confdefs.h. */
15824
15825 __attribute__((noinline)) int
15826 foo(int *p) {
15827 int r;
15828 asm ( "movl \$6, (%1)\n\t"
15829 "xorl %0, %0\n\t"
15830 : "=r" (r) : "r" (p) : "memory"
15831 );
15832 return r;
15833 }
15834 int main() {
15835 int p = 8;
15836 if ((foo(&p) ? : p) != 6)
15837 return 1;
15838 return 0;
15839 }
15840
15841_ACEOF
15842if ac_fn_c_try_run "$LINENO"; then :
15843 have_ipa_pure_const_bug=no
15844else
15845 have_ipa_pure_const_bug=yes
15846fi
15847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15848 conftest.$ac_objext conftest.beam conftest.$ac_ext
15849fi
15850
15851 CFLAGS="$saved_cflags"
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15853$as_echo "$have_ipa_pure_const_bug" >&6; }
15854 if test "$have_ipa_pure_const_bug" = yes; then
15855
15856$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15857
15858 fi
15859 ;;
15860 esac
15861fi
15862
Victor Stinner4f5366e2015-01-09 02:13:19 +010015863# Check for stdatomic.h
15864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15865$as_echo_n "checking for stdatomic.h... " >&6; }
15866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15867/* end confdefs.h. */
15868
15869
15870 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015871 atomic_int value = ATOMIC_VAR_INIT(1);
15872 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015873 int main() {
15874 int loaded_value = atomic_load(&value);
15875 return 0;
15876 }
15877
15878
15879_ACEOF
15880if ac_fn_c_try_link "$LINENO"; then :
15881 have_stdatomic_h=yes
15882else
15883 have_stdatomic_h=no
15884fi
15885rm -f core conftest.err conftest.$ac_objext \
15886 conftest$ac_exeext conftest.$ac_ext
15887
15888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15889$as_echo "$have_stdatomic_h" >&6; }
15890
15891if test "$have_stdatomic_h" = yes; then
15892
15893$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15894
15895fi
15896
15897# Check for GCC >= 4.7 __atomic builtins
15898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15899$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15901/* end confdefs.h. */
15902
15903
15904 volatile int val = 1;
15905 int main() {
15906 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15907 return 0;
15908 }
15909
15910
15911_ACEOF
15912if ac_fn_c_try_link "$LINENO"; then :
15913 have_builtin_atomic=yes
15914else
15915 have_builtin_atomic=no
15916fi
15917rm -f core conftest.err conftest.$ac_objext \
15918 conftest$ac_exeext conftest.$ac_ext
15919
15920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15921$as_echo "$have_builtin_atomic" >&6; }
15922
15923if test "$have_builtin_atomic" = yes; then
15924
15925$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15926
15927fi
15928
Ned Deily322f5ba2013-11-21 23:01:59 -080015929# ensurepip option
15930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15931$as_echo_n "checking for ensurepip... " >&6; }
15932
15933# Check whether --with-ensurepip was given.
15934if test "${with_ensurepip+set}" = set; then :
15935 withval=$with_ensurepip;
15936else
15937 with_ensurepip=upgrade
15938fi
15939
15940case $with_ensurepip in #(
15941 yes|upgrade) :
15942 ENSUREPIP=upgrade ;; #(
15943 install) :
15944 ENSUREPIP=install ;; #(
15945 no) :
15946 ENSUREPIP=no ;; #(
15947 *) :
15948 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15949esac
15950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15951$as_echo "$ENSUREPIP" >&6; }
15952
15953
Victor Stinner35a97c02015-03-08 02:59:09 +010015954# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15956$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958/* end confdefs.h. */
15959
15960
15961 #include <dirent.h>
15962
15963 int main() {
15964 struct dirent entry;
15965 return entry.d_type == DT_UNKNOWN;
15966 }
15967
15968
15969_ACEOF
15970if ac_fn_c_try_link "$LINENO"; then :
15971 have_dirent_d_type=yes
15972else
15973 have_dirent_d_type=no
15974fi
15975rm -f core conftest.err conftest.$ac_objext \
15976 conftest$ac_exeext conftest.$ac_ext
15977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15978$as_echo "$have_dirent_d_type" >&6; }
15979
15980if test "$have_dirent_d_type" = yes; then
15981
15982$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15983
15984fi
15985
Victor Stinner9eb57c52015-03-19 22:21:49 +010015986# check if the Linux getrandom() syscall is available
15987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15988$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990/* end confdefs.h. */
15991
15992
15993 #include <sys/syscall.h>
15994
15995 int main() {
15996 const int flags = 0;
15997 char buffer[1];
15998 int n;
15999 /* ignore the result, Python checks for ENOSYS at runtime */
16000 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
16001 return 0;
16002 }
16003
16004
16005_ACEOF
16006if ac_fn_c_try_link "$LINENO"; then :
16007 have_getrandom_syscall=yes
16008else
16009 have_getrandom_syscall=no
16010fi
16011rm -f core conftest.err conftest.$ac_objext \
16012 conftest$ac_exeext conftest.$ac_ext
16013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16014$as_echo "$have_getrandom_syscall" >&6; }
16015
16016if test "$have_getrandom_syscall" = yes; then
16017
16018$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16019
16020fi
16021
Guido van Rossum627b2d71993-12-24 10:39:16 +000016022# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016023ac_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 +000016024
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016025ac_config_files="$ac_config_files Modules/ld_so_aix"
16026
Martin v. Löwis11437992002-04-12 09:54:03 +000016027cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016028# This file is a shell script that caches the results of configure
16029# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016030# scripts and configure runs, see configure's option --config-cache.
16031# It is not useful on other systems. If it contains results you don't
16032# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016033#
Martin v. Löwis11437992002-04-12 09:54:03 +000016034# config.status only pays attention to the cache file if you give it
16035# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016036#
Skip Montanaro6dead952003-09-25 14:50:04 +000016037# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016038# loading this file, other *unset* `ac_cv_foo' will be assigned the
16039# following values.
16040
16041_ACEOF
16042
Guido van Rossumf78abae1997-01-21 22:02:36 +000016043# The following way of writing the cache mishandles newlines in values,
16044# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016046# Ultrix sh set writes to stderr and can't be redirected directly,
16047# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048(
16049 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16050 eval ac_val=\$$ac_var
16051 case $ac_val in #(
16052 *${as_nl}*)
16053 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16055$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016056 esac
16057 case $ac_var in #(
16058 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16060 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061 esac ;;
16062 esac
16063 done
16064
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016066 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16067 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016068 # `set' does not quote correctly, so add quotes: double-quote
16069 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016071 "s/'/'\\\\''/g;
16072 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 *)
16075 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016076 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078 esac |
16079 sort
16080) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16086 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16088 :end' >>confcache
16089if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16090 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016091 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016092 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16093$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016094 if test ! -f "$cache_file" || test -h "$cache_file"; then
16095 cat confcache >"$cache_file"
16096 else
16097 case $cache_file in #(
16098 */* | ?:*)
16099 mv -f confcache "$cache_file"$$ &&
16100 mv -f "$cache_file"$$ "$cache_file" ;; #(
16101 *)
16102 mv -f confcache "$cache_file" ;;
16103 esac
16104 fi
16105 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016106 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16108$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016109 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016110fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016111rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016112
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016113test "x$prefix" = xNONE && prefix=$ac_default_prefix
16114# Let make expand exec_prefix.
16115test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016117DEFS=-DHAVE_CONFIG_H
16118
Skip Montanaro6dead952003-09-25 14:50:04 +000016119ac_libobjs=
16120ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016121U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016122for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16123 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016125 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16127 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016128 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16129 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016130done
16131LIBOBJS=$ac_libobjs
16132
16133LTLIBOBJS=$ac_ltlibobjs
16134
16135
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137
Victor Stinnere0be4232011-10-25 13:06:09 +020016138: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016139ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016140ac_clean_files_save=$ac_clean_files
16141ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016142{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16143$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16144as_write_fail=0
16145cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016146#! $SHELL
16147# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016148# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016149# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016150# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016151
Martin v. Löwis11437992002-04-12 09:54:03 +000016152debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016153ac_cs_recheck=false
16154ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016155
Matthias Kloseb9621712010-04-24 17:59:49 +000016156SHELL=\${CONFIG_SHELL-$SHELL}
16157export SHELL
16158_ASEOF
16159cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16160## -------------------- ##
16161## M4sh Initialization. ##
16162## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164# Be more Bourne compatible
16165DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016166if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 emulate sh
16168 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016170 # is contrary to our usage. Disable this feature.
16171 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016173else
Matthias Kloseb9621712010-04-24 17:59:49 +000016174 case `(set -o) 2>/dev/null` in #(
16175 *posix*) :
16176 set -o posix ;; #(
16177 *) :
16178 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016180fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016181
16182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183as_nl='
16184'
16185export as_nl
16186# Printing a long string crashes Solaris 7 /usr/bin/printf.
16187as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16188as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16189as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16190# Prefer a ksh shell builtin over an external printf program on Solaris,
16191# but without wasting forks for bash or zsh.
16192if test -z "$BASH_VERSION$ZSH_VERSION" \
16193 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16194 as_echo='print -r --'
16195 as_echo_n='print -rn --'
16196elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16197 as_echo='printf %s\n'
16198 as_echo_n='printf %s'
16199else
16200 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16201 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16202 as_echo_n='/usr/ucb/echo -n'
16203 else
16204 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16205 as_echo_n_body='eval
16206 arg=$1;
16207 case $arg in #(
16208 *"$as_nl"*)
16209 expr "X$arg" : "X\\(.*\\)$as_nl";
16210 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16211 esac;
16212 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16213 '
16214 export as_echo_n_body
16215 as_echo_n='sh -c $as_echo_n_body as_echo'
16216 fi
16217 export as_echo_body
16218 as_echo='sh -c $as_echo_body as_echo'
16219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016220
16221# The user is always right.
16222if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 PATH_SEPARATOR=:
16224 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16225 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16226 PATH_SEPARATOR=';'
16227 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230
16231# IFS
16232# We need space, tab and new line, in precisely that order. Quoting is
16233# there to prevent editors from complaining about space-tab.
16234# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16235# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236IFS=" "" $as_nl"
16237
16238# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016239as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016240case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241 *[\\/]* ) as_myself=$0 ;;
16242 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016243for as_dir in $PATH
16244do
16245 IFS=$as_save_IFS
16246 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16248 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 ;;
16252esac
16253# We did not find ourselves, most probably we were run as `sh COMMAND'
16254# in which case we are not to be found in the path.
16255if test "x$as_myself" = x; then
16256 as_myself=$0
16257fi
16258if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016259 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16260 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261fi
16262
Matthias Kloseb9621712010-04-24 17:59:49 +000016263# Unset variables that we do not need and which cause bugs (e.g. in
16264# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16265# suppresses any "Segmentation fault" message there. '((' could
16266# trigger a bug in pdksh 5.2.14.
16267for as_var in BASH_ENV ENV MAIL MAILPATH
16268do eval test x\${$as_var+set} = xset \
16269 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016270done
16271PS1='$ '
16272PS2='> '
16273PS4='+ '
16274
16275# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016276LC_ALL=C
16277export LC_ALL
16278LANGUAGE=C
16279export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280
Matthias Kloseb9621712010-04-24 17:59:49 +000016281# CDPATH.
16282(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16283
16284
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016285# as_fn_error STATUS ERROR [LINENO LOG_FD]
16286# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016287# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16288# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016289# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016290as_fn_error ()
16291{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016292 as_status=$1; test $as_status -eq 0 && as_status=1
16293 if test "$4"; then
16294 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16295 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016296 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016297 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 as_fn_exit $as_status
16299} # as_fn_error
16300
16301
16302# as_fn_set_status STATUS
16303# -----------------------
16304# Set $? to STATUS, without forking.
16305as_fn_set_status ()
16306{
16307 return $1
16308} # as_fn_set_status
16309
16310# as_fn_exit STATUS
16311# -----------------
16312# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16313as_fn_exit ()
16314{
16315 set +e
16316 as_fn_set_status $1
16317 exit $1
16318} # as_fn_exit
16319
16320# as_fn_unset VAR
16321# ---------------
16322# Portably unset VAR.
16323as_fn_unset ()
16324{
16325 { eval $1=; unset $1;}
16326}
16327as_unset=as_fn_unset
16328# as_fn_append VAR VALUE
16329# ----------------------
16330# Append the text in VALUE to the end of the definition contained in VAR. Take
16331# advantage of any shell optimizations that allow amortized linear growth over
16332# repeated appends, instead of the typical quadratic growth present in naive
16333# implementations.
16334if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16335 eval 'as_fn_append ()
16336 {
16337 eval $1+=\$2
16338 }'
16339else
16340 as_fn_append ()
16341 {
16342 eval $1=\$$1\$2
16343 }
16344fi # as_fn_append
16345
16346# as_fn_arith ARG...
16347# ------------------
16348# Perform arithmetic evaluation on the ARGs, and store the result in the
16349# global $as_val. Take advantage of shells that can avoid forks. The arguments
16350# must be portable across $(()) and expr.
16351if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16352 eval 'as_fn_arith ()
16353 {
16354 as_val=$(( $* ))
16355 }'
16356else
16357 as_fn_arith ()
16358 {
16359 as_val=`expr "$@" || test $? -eq 1`
16360 }
16361fi # as_fn_arith
16362
16363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364if expr a : '\(a\)' >/dev/null 2>&1 &&
16365 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16366 as_expr=expr
16367else
16368 as_expr=false
16369fi
16370
16371if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16372 as_basename=basename
16373else
16374 as_basename=false
16375fi
16376
Matthias Kloseb9621712010-04-24 17:59:49 +000016377if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16378 as_dirname=dirname
16379else
16380 as_dirname=false
16381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016383as_me=`$as_basename -- "$0" ||
16384$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16385 X"$0" : 'X\(//\)$' \| \
16386 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016387$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 sed '/^.*\/\([^/][^/]*\)\/*$/{
16389 s//\1/
16390 q
16391 }
16392 /^X\/\(\/\/\)$/{
16393 s//\1/
16394 q
16395 }
16396 /^X\/\(\/\).*/{
16397 s//\1/
16398 q
16399 }
16400 s/.*/./; q'`
16401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402# Avoid depending upon Character Ranges.
16403as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16404as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16405as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16406as_cr_digits='0123456789'
16407as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408
16409ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016410case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016412 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 xy) ECHO_C='\c';;
16415 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16416 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 esac;;
16418*)
16419 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016421
Martin v. Löwis11437992002-04-12 09:54:03 +000016422rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423if test -d conf$$.dir; then
16424 rm -f conf$$.dir/conf$$.file
16425else
16426 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016429if (echo >conf$$.file) 2>/dev/null; then
16430 if ln -s conf$$.file conf$$ 2>/dev/null; then
16431 as_ln_s='ln -s'
16432 # ... but there are two gotchas:
16433 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16434 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016435 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016436 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016437 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016438 elif ln conf$$.file conf$$ 2>/dev/null; then
16439 as_ln_s=ln
16440 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016441 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016443else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016444 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16447rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016448
Matthias Kloseb9621712010-04-24 17:59:49 +000016449
16450# as_fn_mkdir_p
16451# -------------
16452# Create "$as_dir" as a directory, including parents if necessary.
16453as_fn_mkdir_p ()
16454{
16455
16456 case $as_dir in #(
16457 -*) as_dir=./$as_dir;;
16458 esac
16459 test -d "$as_dir" || eval $as_mkdir_p || {
16460 as_dirs=
16461 while :; do
16462 case $as_dir in #(
16463 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16464 *) as_qdir=$as_dir;;
16465 esac
16466 as_dirs="'$as_qdir' $as_dirs"
16467 as_dir=`$as_dirname -- "$as_dir" ||
16468$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16469 X"$as_dir" : 'X\(//\)[^/]' \| \
16470 X"$as_dir" : 'X\(//\)$' \| \
16471 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16472$as_echo X"$as_dir" |
16473 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16474 s//\1/
16475 q
16476 }
16477 /^X\(\/\/\)[^/].*/{
16478 s//\1/
16479 q
16480 }
16481 /^X\(\/\/\)$/{
16482 s//\1/
16483 q
16484 }
16485 /^X\(\/\).*/{
16486 s//\1/
16487 q
16488 }
16489 s/.*/./; q'`
16490 test -d "$as_dir" && break
16491 done
16492 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016493 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016494
16495
16496} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016497if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016499else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016500 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016501 as_mkdir_p=false
16502fi
16503
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016504
16505# as_fn_executable_p FILE
16506# -----------------------
16507# Test if FILE is an executable regular file.
16508as_fn_executable_p ()
16509{
16510 test -f "$1" && test -x "$1"
16511} # as_fn_executable_p
16512as_test_x='test -x'
16513as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016514
16515# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016516as_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 +000016517
16518# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016519as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016520
16521
Martin v. Löwis11437992002-04-12 09:54:03 +000016522exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016523## ----------------------------------- ##
16524## Main body of $CONFIG_STATUS script. ##
16525## ----------------------------------- ##
16526_ASEOF
16527test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016528
Matthias Kloseb9621712010-04-24 17:59:49 +000016529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16530# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016531# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532# values after options handling.
16533ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016534This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016535generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016536
16537 CONFIG_FILES = $CONFIG_FILES
16538 CONFIG_HEADERS = $CONFIG_HEADERS
16539 CONFIG_LINKS = $CONFIG_LINKS
16540 CONFIG_COMMANDS = $CONFIG_COMMANDS
16541 $ $0 $@
16542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543on `(hostname || uname -n) 2>/dev/null | sed 1q`
16544"
16545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546_ACEOF
16547
Matthias Kloseb9621712010-04-24 17:59:49 +000016548case $ac_config_files in *"
16549"*) set x $ac_config_files; shift; ac_config_files=$*;;
16550esac
16551
16552case $ac_config_headers in *"
16553"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16554esac
16555
16556
16557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016558# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016559config_files="$ac_config_files"
16560config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
Matthias Kloseb9621712010-04-24 17:59:49 +000016564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016565ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016566\`$as_me' instantiates files and other configuration actions
16567from templates according to the current configuration. Unless the files
16568and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
Matthias Kloseb9621712010-04-24 17:59:49 +000016570Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016571
16572 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 --config print configuration, then exit
16575 -q, --quiet, --silent
16576 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016577 -d, --debug don't remove temporary files
16578 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 --file=FILE[:TEMPLATE]
16580 instantiate the configuration file FILE
16581 --header=FILE[:TEMPLATE]
16582 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016583
16584Configuration files:
16585$config_files
16586
16587Configuration headers:
16588$config_headers
16589
Matthias Kloseb9621712010-04-24 17:59:49 +000016590Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016593cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16594ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016595ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016596python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016597configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016598 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016599
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016600Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016601This config.status script is free software; the Free Software Foundation
16602gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603
16604ac_pwd='$ac_pwd'
16605srcdir='$srcdir'
16606INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016607MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016608test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016609_ACEOF
16610
Matthias Kloseb9621712010-04-24 17:59:49 +000016611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16612# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016613ac_need_defaults=:
16614while test $# != 0
16615do
16616 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016617 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16619 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016620 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016621 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016622 --*=)
16623 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16624 ac_optarg=
16625 ac_shift=:
16626 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016628 ac_option=$1
16629 ac_optarg=$2
16630 ac_shift=shift
16631 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 esac
16633
Skip Montanaro6dead952003-09-25 14:50:04 +000016634 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016636 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16637 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 $as_echo "$ac_cs_version"; exit ;;
16640 --config | --confi | --conf | --con | --co | --c )
16641 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016643 debug=: ;;
16644 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016645 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016646 case $ac_optarg in
16647 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016648 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016649 esac
16650 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016651 ac_need_defaults=false;;
16652 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016653 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016654 case $ac_optarg in
16655 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16656 esac
16657 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659 --he | --h)
16660 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016661 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016662Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016664 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016665 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16666 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16667 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016668
16669 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016670 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016671Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016672
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016675
16676 esac
16677 shift
16678done
16679
Skip Montanaro6dead952003-09-25 14:50:04 +000016680ac_configure_extra_args=
16681
16682if $ac_cs_silent; then
16683 exec 6>/dev/null
16684 ac_configure_extra_args="$ac_configure_extra_args --silent"
16685fi
16686
16687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016689if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016690 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 shift
16692 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16693 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016696fi
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700exec 5>>config.log
16701{
16702 echo
16703 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16704## Running $as_me. ##
16705_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016710cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Matthias Kloseb9621712010-04-24 17:59:49 +000016713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714
16715# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016716for ac_config_target in $ac_config_targets
16717do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 case $ac_config_target in
16719 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16720 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16721 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016722 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16723 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16725 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016726 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016727 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016728 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729
Victor Stinnere0be4232011-10-25 13:06:09 +020016730 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 esac
16732done
16733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735# If the user did not use the arguments to specify the items to instantiate,
16736# then the envvar interface is used. Set only those that are not.
16737# We use the long form for the default assignment because of an extremely
16738# bizarre bug on SunOS 4.1.3.
16739if $ac_need_defaults; then
16740 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16741 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16742fi
16743
Skip Montanaro6dead952003-09-25 14:50:04 +000016744# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016746# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747# Hook for its removal unless debugging.
16748# Note that there is a small window in which the directory will not be cleaned:
16749# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016750$debug ||
16751{
Victor Stinnere0be4232011-10-25 13:06:09 +020016752 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016754 : "${ac_tmp:=$tmp}"
16755 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016757 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016758}
Martin v. Löwis11437992002-04-12 09:54:03 +000016759# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016763 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016764} ||
16765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 tmp=./conf$$-$RANDOM
16767 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016768} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016769ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016770
Matthias Kloseb9621712010-04-24 17:59:49 +000016771# Set up the scripts for CONFIG_FILES section.
16772# No need to generate them if there are no CONFIG_FILES.
16773# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016775
Matthias Kloseb9621712010-04-24 17:59:49 +000016776
16777ac_cr=`echo X | tr X '\015'`
16778# On cygwin, bash can eat \r inside `` if the user requested igncr.
16779# But we know of no other shell where ac_cr would be empty at this
16780# point, so we can use a bashism as a fallback.
16781if test "x$ac_cr" = x; then
16782 eval ac_cr=\$\'\\r\'
16783fi
16784ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16785if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016786 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016787else
16788 ac_cs_awk_cr=$ac_cr
16789fi
16790
Victor Stinnere0be4232011-10-25 13:06:09 +020016791echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016792_ACEOF
16793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794
Matthias Kloseb9621712010-04-24 17:59:49 +000016795{
16796 echo "cat >conf$$subs.awk <<_ACEOF" &&
16797 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16798 echo "_ACEOF"
16799} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016800 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16801ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802ac_delim='%!_!# '
16803for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016804 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016805 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806
Matthias Kloseb9621712010-04-24 17:59:49 +000016807 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16808 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016809 break
16810 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016811 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 else
16813 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016815done
Matthias Kloseb9621712010-04-24 17:59:49 +000016816rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
Matthias Kloseb9621712010-04-24 17:59:49 +000016818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016819cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016821sed -n '
16822h
16823s/^/S["/; s/!.*/"]=/
16824p
16825g
16826s/^[^!]*!//
16827:repl
16828t repl
16829s/'"$ac_delim"'$//
16830t delim
16831:nl
16832h
16833s/\(.\{148\}\)..*/\1/
16834t more1
16835s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16836p
16837n
16838b repl
16839:more1
16840s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16841p
16842g
16843s/.\{148\}//
16844t nl
16845:delim
16846h
16847s/\(.\{148\}\)..*/\1/
16848t more2
16849s/["\\]/\\&/g; s/^/"/; s/$/"/
16850p
16851b
16852:more2
16853s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16854p
16855g
16856s/.\{148\}//
16857t delim
16858' <conf$$subs.awk | sed '
16859/^[^""]/{
16860 N
16861 s/\n//
16862}
16863' >>$CONFIG_STATUS || ac_write_fail=1
16864rm -f conf$$subs.awk
16865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16866_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016867cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016868 for (key in S) S_is_set[key] = 1
16869 FS = ""
16870
16871}
16872{
16873 line = $ 0
16874 nfields = split(line, field, "@")
16875 substed = 0
16876 len = length(field[1])
16877 for (i = 2; i < nfields; i++) {
16878 key = field[i]
16879 keylen = length(key)
16880 if (S_is_set[key]) {
16881 value = S[key]
16882 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16883 len += length(value) + length(field[++i])
16884 substed = 1
16885 } else
16886 len += 1 + keylen
16887 }
16888
16889 print line
16890}
16891
16892_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16895if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16896 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16897else
16898 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016899fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016900 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016901_ACEOF
16902
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016903# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16904# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905# trailing colons and then remove the whole line if VPATH becomes empty
16906# (actually we leave an empty line to preserve line numbers).
16907if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016908 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16909h
16910s///
16911s/^/:/
16912s/[ ]*$/:/
16913s/:\$(srcdir):/:/g
16914s/:\${srcdir}:/:/g
16915s/:@srcdir@:/:/g
16916s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016918x
16919s/\(=[ ]*\).*/\1/
16920G
16921s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922s/^[^=]*=[ ]*$//
16923}'
16924fi
16925
Matthias Kloseb9621712010-04-24 17:59:49 +000016926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016927fi # test -n "$CONFIG_FILES"
16928
Matthias Kloseb9621712010-04-24 17:59:49 +000016929# Set up the scripts for CONFIG_HEADERS section.
16930# No need to generate them if there are no CONFIG_HEADERS.
16931# This happens for instance with `./config.status Makefile'.
16932if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016933cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016934BEGIN {
16935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936
Matthias Kloseb9621712010-04-24 17:59:49 +000016937# Transform confdefs.h into an awk script `defines.awk', embedded as
16938# here-document in config.status, that substitutes the proper values into
16939# config.h.in to produce config.h.
16940
16941# Create a delimiter string that does not exist in confdefs.h, to ease
16942# handling of long lines.
16943ac_delim='%!_!# '
16944for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016945 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16946 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016947 break
16948 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016949 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016950 else
16951 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16952 fi
16953done
16954
16955# For the awk script, D is an array of macro values keyed by name,
16956# likewise P contains macro parameters if any. Preserve backslash
16957# newline sequences.
16958
16959ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16960sed -n '
16961s/.\{148\}/&'"$ac_delim"'/g
16962t rset
16963:rset
16964s/^[ ]*#[ ]*define[ ][ ]*/ /
16965t def
16966d
16967:def
16968s/\\$//
16969t bsnl
16970s/["\\]/\\&/g
16971s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16972D["\1"]=" \3"/p
16973s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16974d
16975:bsnl
16976s/["\\]/\\&/g
16977s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16978D["\1"]=" \3\\\\\\n"\\/p
16979t cont
16980s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16981t cont
16982d
16983:cont
16984n
16985s/.\{148\}/&'"$ac_delim"'/g
16986t clear
16987:clear
16988s/\\$//
16989t bsnlc
16990s/["\\]/\\&/g; s/^/"/; s/$/"/p
16991d
16992:bsnlc
16993s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16994b cont
16995' <confdefs.h | sed '
16996s/'"$ac_delim"'/"\\\
16997"/g' >>$CONFIG_STATUS || ac_write_fail=1
16998
16999cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17000 for (key in D) D_is_set[key] = 1
17001 FS = ""
17002}
17003/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17004 line = \$ 0
17005 split(line, arg, " ")
17006 if (arg[1] == "#") {
17007 defundef = arg[2]
17008 mac1 = arg[3]
17009 } else {
17010 defundef = substr(arg[1], 2)
17011 mac1 = arg[2]
17012 }
17013 split(mac1, mac2, "(") #)
17014 macro = mac2[1]
17015 prefix = substr(line, 1, index(line, defundef) - 1)
17016 if (D_is_set[macro]) {
17017 # Preserve the white space surrounding the "#".
17018 print prefix "define", macro P[macro] D[macro]
17019 next
17020 } else {
17021 # Replace #undef with comments. This is necessary, for example,
17022 # in the case of _POSIX_SOURCE, which is predefined and required
17023 # on some systems where configure will not decide to define it.
17024 if (defundef == "undef") {
17025 print "/*", prefix defundef, macro, "*/"
17026 next
17027 }
17028 }
17029}
17030{ print }
17031_ACAWK
17032_ACEOF
17033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017034 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017035fi # test -n "$CONFIG_HEADERS"
17036
17037
17038eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17039shift
17040for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041do
17042 case $ac_tag in
17043 :[FHLC]) ac_mode=$ac_tag; continue;;
17044 esac
17045 case $ac_mode$ac_tag in
17046 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017047 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 :[FH]-) ac_tag=-:-;;
17049 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17050 esac
17051 ac_save_IFS=$IFS
17052 IFS=:
17053 set x $ac_tag
17054 IFS=$ac_save_IFS
17055 shift
17056 ac_file=$1
17057 shift
17058
17059 case $ac_mode in
17060 :L) ac_source=$1;;
17061 :[FH])
17062 ac_file_inputs=
17063 for ac_f
17064 do
17065 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017066 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 *) # Look for the file first in the build tree, then in the source tree
17068 # (if the path is not absolute). The absolute path cannot be DOS-style,
17069 # because $ac_f cannot contain `:'.
17070 test -f "$ac_f" ||
17071 case $ac_f in
17072 [\\/$]*) false;;
17073 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17074 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017075 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017077 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17078 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 done
17080
17081 # Let's still pretend it is `configure' which instantiates (i.e., don't
17082 # use $as_me), people would be surprised to read:
17083 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 configure_input='Generated from '`
17085 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17086 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087 if test x"$ac_file" != x-; then
17088 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17090$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017092 # Neutralize special characters interpreted by sed in replacement strings.
17093 case $configure_input in #(
17094 *\&* | *\|* | *\\* )
17095 ac_sed_conf_input=`$as_echo "$configure_input" |
17096 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17097 *) ac_sed_conf_input=$configure_input;;
17098 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099
17100 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017101 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17102 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 esac
17104 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 esac
17106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017108$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017109 X"$ac_file" : 'X\(//\)[^/]' \| \
17110 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017112$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17114 s//\1/
17115 q
17116 }
17117 /^X\(\/\/\)[^/].*/{
17118 s//\1/
17119 q
17120 }
17121 /^X\(\/\/\)$/{
17122 s//\1/
17123 q
17124 }
17125 /^X\(\/\).*/{
17126 s//\1/
17127 q
17128 }
17129 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 ac_builddir=.
17132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133case "$ac_dir" in
17134.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17135*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017136 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017137 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017139 case $ac_top_builddir_sub in
17140 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17141 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17142 esac ;;
17143esac
17144ac_abs_top_builddir=$ac_pwd
17145ac_abs_builddir=$ac_pwd$ac_dir_suffix
17146# for backward compatibility:
17147ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017148
17149case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152 ac_top_srcdir=$ac_top_builddir_sub
17153 ac_abs_top_srcdir=$ac_pwd ;;
17154 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156 ac_top_srcdir=$srcdir
17157 ac_abs_top_srcdir=$srcdir ;;
17158 *) # Relative name.
17159 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17160 ac_top_srcdir=$ac_top_build_prefix$srcdir
17161 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017162esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017164
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166 case $ac_mode in
17167 :F)
17168 #
17169 # CONFIG_FILE
17170 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017171
17172 case $INSTALL in
17173 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017176 ac_MKDIR_P=$MKDIR_P
17177 case $MKDIR_P in
17178 [\\/$]* | ?:[\\/]* ) ;;
17179 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17180 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017181_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182
Matthias Kloseb9621712010-04-24 17:59:49 +000017183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184# If the template does not know about datarootdir, expand it.
17185# FIXME: This hack should be removed a few years after 2.60.
17186ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017187ac_sed_dataroot='
17188/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189 p
17190 q
17191}
17192/@datadir@/p
17193/@docdir@/p
17194/@infodir@/p
17195/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017196/@mandir@/p'
17197case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198*datarootdir*) ac_datarootdir_seen=yes;;
17199*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17201$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204 ac_datarootdir_hack='
17205 s&@datadir@&$datadir&g
17206 s&@docdir@&$docdir&g
17207 s&@infodir@&$infodir&g
17208 s&@localedir@&$localedir&g
17209 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211esac
17212_ACEOF
17213
17214# Neutralize VPATH when `$srcdir' = `.'.
17215# Shell code in configure.ac might set extrasub.
17216# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17218ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017219$extrasub
17220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017222:t
17223/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017224s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017226s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227s&@srcdir@&$ac_srcdir&;t t
17228s&@abs_srcdir@&$ac_abs_srcdir&;t t
17229s&@top_srcdir@&$ac_top_srcdir&;t t
17230s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17231s&@builddir@&$ac_builddir&;t t
17232s&@abs_builddir@&$ac_abs_builddir&;t t
17233s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17234s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017235s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017237"
Victor Stinnere0be4232011-10-25 13:06:09 +020017238eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17239 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017242 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17243 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17244 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017245 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017246which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017247$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017248which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017249
Victor Stinnere0be4232011-10-25 13:06:09 +020017250 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017252 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17253 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017254 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017255 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 ;;
17257 :H)
17258 #
17259 # CONFIG_HEADER
17260 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017262 {
17263 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017264 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17265 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017267 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17269$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017272 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017274 fi
17275 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017276 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017277 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017278 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282
17283 esac
17284
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017285
17286 case $ac_file$ac_mode in
17287 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17288
17289 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290done # for ac_tag
17291
Guido van Rossum627b2d71993-12-24 10:39:16 +000017292
Matthias Kloseb9621712010-04-24 17:59:49 +000017293as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017294_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017295ac_clean_files=$ac_clean_files_save
17296
Matthias Kloseb9621712010-04-24 17:59:49 +000017297test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017298 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017299
Martin v. Löwis11437992002-04-12 09:54:03 +000017300
17301# configure is writing to config.log, and then calls config.status.
17302# config.status does its own redirection, appending to config.log.
17303# Unfortunately, on DOS this fails, as config.log is still kept open
17304# by configure, so config.status won't be able to write to it; its
17305# output is simply discarded. So we exec the FD to /dev/null,
17306# effectively closing config.log, so it can be properly (re)opened and
17307# appended to by config.status. When coming back to configure, we
17308# need to make the FD available again.
17309if test "$no_create" != yes; then
17310 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017311 ac_config_status_args=
17312 test "$silent" = yes &&
17313 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017314 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017315 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017316 exec 5>>config.log
17317 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17318 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017319 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017320fi
17321if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17323$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017324fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017325
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017326
Christian Heimes75ed8902013-11-20 01:11:18 +010017327echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017328if test ! -f Modules/Setup
17329then
17330 cp $srcdir/Modules/Setup.dist Modules/Setup
17331fi
17332
Christian Heimes75ed8902013-11-20 01:11:18 +010017333echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017334if test ! -f Modules/Setup.local
17335then
17336 echo "# Edit this file for local setup changes" >Modules/Setup.local
17337fi
17338
Christian Heimes75ed8902013-11-20 01:11:18 +010017339echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017340$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17341 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017342 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017343mv config.c Modules