blob: fbde7f6f5564fb730fc602fe8f46e3500c6b4774 [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
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
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200707MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200708PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200709PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200711ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MAINCC
713CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714GREP
715CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000716OBJEXT
717EXEEXT
718ac_ct_CC
719CPPFLAGS
720LDFLAGS
721CFLAGS
722CC
723EXPORT_MACOSX_DEPLOYMENT_TARGET
724CONFIGURE_MACOSX_DEPLOYMENT_TARGET
725SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200726_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000727MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000728FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000729FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800730FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKALTINSTALLLAST
732FRAMEWORKALTINSTALLFIRST
733FRAMEWORKINSTALLLAST
734FRAMEWORKINSTALLFIRST
735PYTHONFRAMEWORKINSTALLDIR
736PYTHONFRAMEWORKPREFIX
737PYTHONFRAMEWORKDIR
738PYTHONFRAMEWORKIDENTIFIER
739PYTHONFRAMEWORK
740LIPO_32BIT_FLAGS
741ARCH_RUN_32BIT
742UNIVERSALSDK
743CONFIG_ARGS
744SOVERSION
745VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200746PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Martin Panter1046d5c2016-04-23 00:58:44 +0000755cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500756HAS_HG
757HGBRANCH
758HGTAG
759HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400760BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
doko@ubuntu.com55532312016-06-14 08:55:19 +0200780runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700814with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100815with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100816with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_libs
818with_system_expat
819with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100820with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000821enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700822with_tcltk_includes
823with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_dbmliborder
825with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_threads
827with_thread
828enable_ipv6
829with_doc_strings
830with_tsc
831with_pymalloc
832with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_fpectl
834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000839'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 ac_precious_vars='build_alias
841host_alias
842target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100843MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844CC
845CFLAGS
846LDFLAGS
847LIBS
848CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100849CPP
850PKG_CONFIG
851PKG_CONFIG_PATH
852PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856ac_init_help=
857ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000858ac_unrecognized_opts=
859ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# The variables have the same names as the options, with
861# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865no_recursion=
866prefix=NONE
867program_prefix=NONE
868program_suffix=NONE
869program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874x_includes=NONE
875x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877# Installation directory options.
878# These are left unexpanded so users can "make install exec_prefix=/foo"
879# and all the variables that are supposed to be based on exec_prefix
880# by default will actually change.
881# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883bindir='${exec_prefix}/bin'
884sbindir='${exec_prefix}/sbin'
885libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886datarootdir='${prefix}/share'
887datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888sysconfdir='${prefix}/etc'
889sharedstatedir='${prefix}/com'
890localstatedir='${prefix}/var'
doko@ubuntu.com55532312016-06-14 08:55:19 +0200891runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892includedir='${prefix}/include'
893oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895infodir='${datarootdir}/info'
896htmldir='${docdir}'
897dvidir='${docdir}'
898pdfdir='${docdir}'
899psdir='${docdir}'
900libdir='${exec_prefix}/lib'
901localedir='${datarootdir}/locale'
902mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 # If the previous option needs an argument, assign it.
909 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 ac_prev=
912 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200916 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917 *=) ac_optarg= ;;
918 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Accept the important Cygnus configure options, so we can diagnose typos.
922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_dashdash$ac_option in
924 --)
925 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -bindir | --bindir | --bindi | --bind | --bin | --bi)
928 ac_prev=bindir ;;
929 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 -cache-file | --cache-file | --cache-fil | --cache-fi \
938 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939 ac_prev=cache_file ;;
940 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 cache_file=$ac_optarg ;;
943
944 --config-cache | -C)
945 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953 | --dataroo | --dataro | --datar)
954 ac_prev=datarootdir ;;
955 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957 datarootdir=$ac_optarg ;;
958
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974
975 -docdir | --docdir | --docdi | --doc | --do)
976 ac_prev=docdir ;;
977 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978 docdir=$ac_optarg ;;
979
980 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981 ac_prev=dvidir ;;
982 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003 | --exec | --exe | --ex)
1004 ac_prev=exec_prefix ;;
1005 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Obsolete; use --with-gas.
1012 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 -help | --help | --hel | --he | -h)
1015 ac_init_help=long ;;
1016 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017 ac_init_help=recursive ;;
1018 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027 ac_prev=htmldir ;;
1028 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029 | --ht=*)
1030 htmldir=$ac_optarg ;;
1031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 -includedir | --includedir | --includedi | --included | --include \
1033 | --includ | --inclu | --incl | --inc)
1034 ac_prev=includedir ;;
1035 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -infodir | --infodir | --infodi | --infod | --info | --inf)
1040 ac_prev=infodir ;;
1041 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libdir | --libdir | --libdi | --libd)
1045 ac_prev=libdir ;;
1046 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050 | --libexe | --libex | --libe)
1051 ac_prev=libexecdir ;;
1052 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 -localedir | --localedir | --localedi | --localed | --locale)
1057 ac_prev=localedir ;;
1058 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059 localedir=$ac_optarg ;;
1060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 ac_prev=localstatedir ;;
1064 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069 ac_prev=mandir ;;
1070 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Obsolete; use --without-fp.
1075 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 no_create=yes ;;
1080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087 | --oldin | --oldi | --old | --ol | --o)
1088 ac_prev=oldincludedir ;;
1089 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 ac_prev=prefix ;;
1096 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100 | --program-pre | --program-pr | --program-p)
1101 ac_prev=program_prefix ;;
1102 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107 | --program-suf | --program-su | --program-s)
1108 ac_prev=program_suffix ;;
1109 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-transform-name | --program-transform-name \
1114 | --program-transform-nam | --program-transform-na \
1115 | --program-transform-n | --program-transform- \
1116 | --program-transform | --program-transfor \
1117 | --program-transfo | --program-transf \
1118 | --program-trans | --program-tran \
1119 | --progr-tra | --program-tr | --program-t)
1120 ac_prev=program_transform_name ;;
1121 -program-transform-name=* | --program-transform-name=* \
1122 | --program-transform-nam=* | --program-transform-na=* \
1123 | --program-transform-n=* | --program-transform-=* \
1124 | --program-transform=* | --program-transfor=* \
1125 | --program-transfo=* | --program-transf=* \
1126 | --program-trans=* | --program-tran=* \
1127 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001130 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131 ac_prev=pdfdir ;;
1132 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133 pdfdir=$ac_optarg ;;
1134
1135 -psdir | --psdir | --psdi | --psd | --ps)
1136 ac_prev=psdir ;;
1137 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138 psdir=$ac_optarg ;;
1139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141 | -silent | --silent | --silen | --sile | --sil)
1142 silent=yes ;;
1143
doko@ubuntu.com55532312016-06-14 08:55:19 +02001144 -runstatedir | --runstatedir | --runstatedi | --runstated \
1145 | --runstate | --runstat | --runsta | --runst | --runs \
1146 | --run | --ru | --r)
1147 ac_prev=runstatedir ;;
1148 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1149 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1150 | --run=* | --ru=* | --r=*)
1151 runstatedir=$ac_optarg ;;
1152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154 ac_prev=sbindir ;;
1155 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
1159 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161 | --sharedst | --shareds | --shared | --share | --shar \
1162 | --sha | --sh)
1163 ac_prev=sharedstatedir ;;
1164 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 -site | --site | --sit)
1171 ac_prev=site ;;
1172 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176 ac_prev=srcdir ;;
1177 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181 | --syscon | --sysco | --sysc | --sys | --sy)
1182 ac_prev=sysconfdir ;;
1183 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193 verbose=yes ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 -version | --version | --versio | --versi | --vers | -V)
1196 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
1227 esac
1228 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 --x)
1231 # Obsolete; use --with-x.
1232 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235 | --x-incl | --x-inc | --x-in | --x-i)
1236 ac_prev=x_includes ;;
1237 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243 ac_prev=x_libraries ;;
1244 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1249Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 *=*)
1253 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 case $ac_envvar in #(
1256 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 export $ac_envvar ;;
1261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001262 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001267 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
1270 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271done
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276fi
1277
Matthias Kloseb9621712010-04-24 17:59:49 +00001278if test -n "$ac_unrecognized_opts"; then
1279 case $enable_option_checking in
1280 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1283 esac
1284fi
1285
1286# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1288 datadir sysconfdir sharedstatedir localstatedir includedir \
1289 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
doko@ubuntu.com55532312016-06-14 08:55:19 +02001290 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 # Remove trailing slashes.
1294 case $ac_val in
1295 */ )
1296 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1297 eval $ac_var=\$ac_val;;
1298 esac
1299 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 [\\/$]* | ?:[\\/]* ) continue;;
1302 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# There might be people who depend on the old broken behavior: `$host'
1308# used to hold the argument of --host etc.
1309# FIXME: To remove some day.
1310build=$build_alias
1311host=$host_alias
1312target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# FIXME: To remove some day.
1315if test "x$host_alias" != x; then
1316 if test "x$build_alias" = x; then
1317 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321fi
1322
1323ac_tool_prefix=
1324test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326test "$silent" = yes && exec 6>/dev/null
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330ac_ls_di=`ls -di .` &&
1331ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# Find the source files, if location was not specified.
1338if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 ac_confdir=`$as_dirname -- "$as_myself" ||
1342$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1343 X"$as_myself" : 'X\(//\)[^/]' \| \
1344 X"$as_myself" : 'X\(//\)$' \| \
1345 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1346$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)[^/].*/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\).*/{
1360 s//\1/
1361 q
1362 }
1363 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001364 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366 srcdir=..
1367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368else
1369 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371if test ! -r "$srcdir/$ac_unique_file"; then
1372 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1376ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 pwd)`
1379# When building in place, set srcdir=.
1380if test "$ac_abs_confdir" = "$ac_pwd"; then
1381 srcdir=.
1382fi
1383# Remove unnecessary trailing slashes from srcdir.
1384# Double slashes in file names in object file debugging info
1385# mess up M-x gdb in Emacs.
1386case $srcdir in
1387*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1388esac
1389for ac_var in $ac_precious_vars; do
1390 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_env_${ac_var}_value=\$${ac_var}
1392 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396#
1397# Report the --help message.
1398#
1399if test "$ac_init_help" = "long"; then
1400 # Omit some internal or obsolete options to make the list less imposing.
1401 # This message is too long to be a string in the A/UX 3.1 sh.
1402 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001403\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Usage: $0 [OPTION]... [VAR=VALUE]...
1406
1407To assign environment variables (e.g., CC, CFLAGS...), specify them as
1408VAR=VALUE. See below for descriptions of some of the useful variables.
1409
1410Defaults for the options are specified in brackets.
1411
1412Configuration:
1413 -h, --help display this help and exit
1414 --help=short display options specific to this package
1415 --help=recursive display the short help of all the included packages
1416 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001417 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --cache-file=FILE cache test results in FILE [disabled]
1419 -C, --config-cache alias for \`--cache-file=config.cache'
1420 -n, --no-create do not create output files
1421 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1422
Martin v. Löwis11437992002-04-12 09:54:03 +00001423Installation directories:
1424 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429By default, \`make install' will install all the files in
1430\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1431an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1432for instance \`--prefix=\$HOME'.
1433
1434For better control, use the options below.
1435
1436Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --bindir=DIR user executables [EPREFIX/bin]
1438 --sbindir=DIR system admin executables [EPREFIX/sbin]
1439 --libexecdir=DIR program executables [EPREFIX/libexec]
1440 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1441 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1442 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
doko@ubuntu.com55532312016-06-14 08:55:19 +02001443 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465fi
1466
1467if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001469 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 cat <<\_ACEOF
1472
1473Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001477 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001478 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-framework[=INSTALLDIR]
1480 Build (MacOSX|Darwin) framework
1481 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001482 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001483 --enable-loadable-sqlite-extensions
1484 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-ipv6 Enable ipv6 (with ipv4) support
1486 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001487 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Optional Packages:
1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1492 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001493 --with-universal-archs=ARCH
1494 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001495 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001496 --with-framework-name=FRAMEWORK
1497 specify an alternate name of the framework built
1498 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001500 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001506 --with-lto Enable Link Time Optimization in PGO builds.
1507 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-threads[=DIRECTORY]
1528 disable/enable thread support
1529 --with(out)-thread[=DIRECTORY]
1530 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001532 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001534 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-fpectl enable SIGFPE catching
1536 --with-libm=STRING math library
1537 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001538 --with(out)-computed-gotos
1539 Use computed gotos in evaluation loop (enabled by
1540 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001541 --with(out)-ensurepip=[=upgrade]
1542 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001543
1544Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001545 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 CC C compiler command
1547 CFLAGS C compiler flags
1548 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1549 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001554 PKG_CONFIG path to pkg-config utility
1555 PKG_CONFIG_PATH
1556 directories to add to pkg-config's search path
1557 PKG_CONFIG_LIBDIR
1558 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560Use these variables to override the choices made by `configure' or to help
1561it to find libraries and programs with nonstandard names/locations.
1562
Georg Brandle2e15612009-05-20 18:25:10 +00001563Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001566fi
1567
1568if test "$ac_init_help" = "recursive"; then
1569 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 test -d "$ac_dir" ||
1572 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1573 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 ac_builddir=.
1575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576case "$ac_dir" in
1577.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1578*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 case $ac_top_builddir_sub in
1583 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1585 esac ;;
1586esac
1587ac_abs_top_builddir=$ac_pwd
1588ac_abs_builddir=$ac_pwd$ac_dir_suffix
1589# for backward compatibility:
1590ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001591
1592case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 ac_top_srcdir=$ac_top_builddir_sub
1596 ac_abs_top_srcdir=$ac_pwd ;;
1597 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$srcdir
1600 ac_abs_top_srcdir=$srcdir ;;
1601 *) # Relative name.
1602 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1603 ac_top_srcdir=$ac_top_build_prefix$srcdir
1604 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001605esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 cd "$ac_dir" || { ac_status=$?; continue; }
1609 # Check for guested configure.
1610 if test -f "$ac_srcdir/configure.gnu"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1613 elif test -f "$ac_srcdir/configure"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001617 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 fi || ac_status=$?
1619 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 done
1621fi
1622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001624if $ac_init_version; then
1625 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001626python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001629Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001630This configure script is free software; the Free Software Foundation
1631gives unlimited permission to copy, distribute and modify it.
1632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001635
1636## ------------------------ ##
1637## Autoconf initialization. ##
1638## ------------------------ ##
1639
1640# ac_fn_c_try_compile LINENO
1641# --------------------------
1642# Try to compile conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_compile ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext
1647 if { { ac_try="$ac_compile"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_compile") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest.$ac_objext; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_compile
1677
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001678# ac_fn_c_try_cpp LINENO
1679# ----------------------
1680# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1681ac_fn_c_try_cpp ()
1682{
1683 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684 if { { ac_try="$ac_cpp conftest.$ac_ext"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690$as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } > conftest.i && {
1700 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 }; then :
1703 ac_retval=0
1704else
1705 $as_echo "$as_me: failed program was:" >&5
1706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
1710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_cpp
1714
Matthias Kloseb9621712010-04-24 17:59:49 +00001715# ac_fn_c_try_link LINENO
1716# -----------------------
1717# Try to link conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_link ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 rm -f conftest.$ac_objext conftest$ac_exeext
1722 if { { ac_try="$ac_link"
1723case "(($ac_try" in
1724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725 *) ac_try_echo=$ac_try;;
1726esac
1727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728$as_echo "$ac_try_echo"; } >&5
1729 (eval "$ac_link") 2>conftest.err
1730 ac_status=$?
1731 if test -s conftest.err; then
1732 grep -v '^ *+' conftest.err >conftest.er1
1733 cat conftest.er1 >&5
1734 mv -f conftest.er1 conftest.err
1735 fi
1736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737 test $ac_status = 0; } && {
1738 test -z "$ac_c_werror_flag" ||
1739 test ! -s conftest.err
1740 } && test -s conftest$ac_exeext && {
1741 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001742 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 }; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1752 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1753 # interfere with the next link command; also delete a directory that is
1754 # left behind by Apple's compiler. We do this before executing the actions.
1755 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 as_fn_set_status $ac_retval
1758
1759} # ac_fn_c_try_link
1760
Matthias Kloseb9621712010-04-24 17:59:49 +00001761# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1762# -------------------------------------------------------
1763# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1764# the include files in INCLUDES and setting the cache variable VAR
1765# accordingly.
1766ac_fn_c_check_header_mongrel ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001769 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1771$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001772if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 $as_echo_n "(cached) " >&6
1774fi
1775eval ac_res=\$$3
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1777$as_echo "$ac_res" >&6; }
1778else
1779 # Is the header compilable?
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1781$as_echo_n "checking $2 usability... " >&6; }
1782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1783/* end confdefs.h. */
1784$4
1785#include <$2>
1786_ACEOF
1787if ac_fn_c_try_compile "$LINENO"; then :
1788 ac_header_compiler=yes
1789else
1790 ac_header_compiler=no
1791fi
1792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1794$as_echo "$ac_header_compiler" >&6; }
1795
1796# Is the header present?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1798$as_echo_n "checking $2 presence... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_cpp "$LINENO"; then :
1804 ac_header_preproc=yes
1805else
1806 ac_header_preproc=no
1807fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001808rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1810$as_echo "$ac_header_preproc" >&6; }
1811
1812# So? What about this header?
1813case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1814 yes:no: )
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1816$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1818$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1819 ;;
1820 no:yes:* )
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1822$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1824$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1826$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1828$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001831( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001832## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001833## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 ) | sed "s/^/$as_me: WARNING: /" >&2
1835 ;;
1836esac
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 eval "$3=\$ac_header_compiler"
1843fi
1844eval ac_res=\$$3
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1846$as_echo "$ac_res" >&6; }
1847fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001849
1850} # ac_fn_c_check_header_mongrel
1851
1852# ac_fn_c_try_run LINENO
1853# ----------------------
1854# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1855# that executables *can* be run.
1856ac_fn_c_try_run ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 if { { ac_try="$ac_link"
1860case "(($ac_try" in
1861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862 *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865$as_echo "$ac_try_echo"; } >&5
1866 (eval "$ac_link") 2>&5
1867 ac_status=$?
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1870 { { case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_try") 2>&5
1877 ac_status=$?
1878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879 test $ac_status = 0; }; }; then :
1880 ac_retval=0
1881else
1882 $as_echo "$as_me: program exited with status $ac_status" >&5
1883 $as_echo "$as_me: failed program was:" >&5
1884sed 's/^/| /' conftest.$ac_ext >&5
1885
1886 ac_retval=$ac_status
1887fi
1888 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 as_fn_set_status $ac_retval
1891
1892} # ac_fn_c_try_run
1893
1894# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1895# -------------------------------------------------------
1896# Tests whether HEADER exists and can be compiled using the include files in
1897# INCLUDES, setting the cache variable VAR accordingly.
1898ac_fn_c_check_header_compile ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909#include <$2>
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 eval "$3=yes"
1913else
1914 eval "$3=no"
1915fi
1916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923} # ac_fn_c_check_header_compile
1924
Matthias Kloseb9621712010-04-24 17:59:49 +00001925# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1926# -------------------------------------------
1927# Tests whether TYPE exists after having included INCLUDES, setting cache
1928# variable VAR accordingly.
1929ac_fn_c_check_type ()
1930{
1931 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001934if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=no"
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof ($2))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954int
1955main ()
1956{
1957if (sizeof (($2)))
1958 return 0;
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964
1965else
1966 eval "$3=yes"
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972eval ac_res=\$$3
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1974$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001976
1977} # ac_fn_c_check_type
1978
1979# ac_fn_c_find_uintX_t LINENO BITS VAR
1980# ------------------------------------
1981# Finds an unsigned integer type with width BITS, setting cache variable VAR
1982# accordingly.
1983ac_fn_c_find_uintX_t ()
1984{
1985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1987$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001988if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989 $as_echo_n "(cached) " >&6
1990else
1991 eval "$3=no"
1992 # Order is important - never check a type that is potentially smaller
1993 # than half of the expected target width.
1994 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1995 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$ac_includes_default
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 case $ac_type in #(
2012 uint$2_t) :
2013 eval "$3=yes" ;; #(
2014 *) :
2015 eval "$3=\$ac_type" ;;
2016esac
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002019 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021else
2022 break
2023fi
2024 done
2025fi
2026eval ac_res=\$$3
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002030
2031} # ac_fn_c_find_uintX_t
2032
2033# ac_fn_c_find_intX_t LINENO BITS VAR
2034# -----------------------------------
2035# Finds a signed integer type with width BITS, setting cache variable VAR
2036# accordingly.
2037ac_fn_c_find_intX_t ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2041$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002042if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 $as_echo_n "(cached) " >&6
2044else
2045 eval "$3=no"
2046 # Order is important - never check a type that is potentially smaller
2047 # than half of the expected target width.
2048 for ac_type in int$2_t 'int' 'long int' \
2049 'long long int' 'short int' 'signed char'; do
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002053 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002054int
2055main ()
2056{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002057static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002069 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002070int
2071main ()
2072{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002073static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002074 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083
2084else
2085 case $ac_type in #(
2086 int$2_t) :
2087 eval "$3=yes" ;; #(
2088 *) :
2089 eval "$3=\$ac_type" ;;
2090esac
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002095 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097else
2098 break
2099fi
2100 done
2101fi
2102eval ac_res=\$$3
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2104$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002105 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107} # ac_fn_c_find_intX_t
2108
2109# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2110# --------------------------------------------
2111# Tries to find the compile-time value of EXPR in a program that includes
2112# INCLUDES, setting VAR accordingly. Returns whether the value could be
2113# computed
2114ac_fn_c_compute_int ()
2115{
2116 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2117 if test "$cross_compiling" = yes; then
2118 # Depending upon the size, compute the lo and hi bounds.
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002126test_array [0] = 0;
2127return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_lo=0 ac_mid=0
2135 while :; do
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid; break
2152else
2153 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2154 if test $ac_lo -le $ac_mid; then
2155 ac_lo= ac_hi=
2156 break
2157 fi
2158 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 done
2162else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002170test_array [0] = 0;
2171return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 ac_hi=-1 ac_mid=-1
2179 while :; do
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183int
2184main ()
2185{
2186static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002187test_array [0] = 0;
2188return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002189
2190 ;
2191 return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_compile "$LINENO"; then :
2195 ac_lo=$ac_mid; break
2196else
2197 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2198 if test $ac_mid -le $ac_hi; then
2199 ac_lo= ac_hi=
2200 break
2201 fi
2202 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205 done
2206else
2207 ac_lo= ac_hi=
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212# Binary search between lo and hi bounds.
2213while test "x$ac_lo" != "x$ac_hi"; do
2214 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002222test_array [0] = 0;
2223return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_hi=$ac_mid
2231else
2232 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235done
2236case $ac_lo in #((
2237?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2238'') ac_retval=1 ;;
2239esac
2240 else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244static long int longval () { return $2; }
2245static unsigned long int ulongval () { return $2; }
2246#include <stdio.h>
2247#include <stdlib.h>
2248int
2249main ()
2250{
2251
2252 FILE *f = fopen ("conftest.val", "w");
2253 if (! f)
2254 return 1;
2255 if (($2) < 0)
2256 {
2257 long int i = longval ();
2258 if (i != ($2))
2259 return 1;
2260 fprintf (f, "%ld", i);
2261 }
2262 else
2263 {
2264 unsigned long int i = ulongval ();
2265 if (i != ($2))
2266 return 1;
2267 fprintf (f, "%lu", i);
2268 }
2269 /* Do not output a trailing newline, as this causes \r\n confusion
2270 on some platforms. */
2271 return ferror (f) || fclose (f) != 0;
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_run "$LINENO"; then :
2278 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2279else
2280 ac_retval=1
2281fi
2282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2283 conftest.$ac_objext conftest.beam conftest.$ac_ext
2284rm -f conftest.val
2285
2286 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 as_fn_set_status $ac_retval
2289
2290} # ac_fn_c_compute_int
2291
2292# ac_fn_c_check_func LINENO FUNC VAR
2293# ----------------------------------
2294# Tests whether FUNC exists, setting the cache variable VAR accordingly
2295ac_fn_c_check_func ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2299$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2307#define $2 innocuous_$2
2308
2309/* System header to define __stub macros and hopefully few prototypes,
2310 which can conflict with char $2 (); below.
2311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2312 <limits.h> exists even on freestanding compilers. */
2313
2314#ifdef __STDC__
2315# include <limits.h>
2316#else
2317# include <assert.h>
2318#endif
2319
2320#undef $2
2321
2322/* Override any GCC internal prototype to avoid an error.
2323 Use char because int might match the return type of a GCC
2324 builtin and then its argument prototype would still apply. */
2325#ifdef __cplusplus
2326extern "C"
2327#endif
2328char $2 ();
2329/* The GNU C library defines this for functions which it implements
2330 to always fail with ENOSYS. Some functions are actually named
2331 something starting with __ and the normal name is an alias. */
2332#if defined __stub_$2 || defined __stub___$2
2333choke me
2334#endif
2335
2336int
2337main ()
2338{
2339return $2 ();
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_link "$LINENO"; then :
2345 eval "$3=yes"
2346else
2347 eval "$3=no"
2348fi
2349rm -f core conftest.err conftest.$ac_objext \
2350 conftest$ac_exeext conftest.$ac_ext
2351fi
2352eval ac_res=\$$3
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002355 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002356
2357} # ac_fn_c_check_func
2358
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002359# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2360# ---------------------------------------------
2361# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2362# accordingly.
2363ac_fn_c_check_decl ()
2364{
2365 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366 as_decl_name=`echo $2|sed 's/ *(.*//'`
2367 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2369$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2370if eval \${$3+:} false; then :
2371 $as_echo_n "(cached) " >&6
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$4
2376int
2377main ()
2378{
2379#ifndef $as_decl_name
2380#ifdef __cplusplus
2381 (void) $as_decl_use;
2382#else
2383 (void) $as_decl_name;
2384#endif
2385#endif
2386
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$3=yes"
2393else
2394 eval "$3=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$3
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402
2403} # ac_fn_c_check_decl
2404
Matthias Kloseb9621712010-04-24 17:59:49 +00002405# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2406# ----------------------------------------------------
2407# Tries to find if the field MEMBER exists in type AGGR, after including
2408# INCLUDES, setting cache variable VAR accordingly.
2409ac_fn_c_check_member ()
2410{
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2413$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002414if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 $as_echo_n "(cached) " >&6
2416else
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h. */
2419$5
2420int
2421main ()
2422{
2423static $2 ac_aggr;
2424if (ac_aggr.$3)
2425return 0;
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$4=yes"
2432else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$5
2436int
2437main ()
2438{
2439static $2 ac_aggr;
2440if (sizeof ac_aggr.$3)
2441return 0;
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446if ac_fn_c_try_compile "$LINENO"; then :
2447 eval "$4=yes"
2448else
2449 eval "$4=no"
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$4
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002459
2460} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002462This file contains any messages produced by compilers while
2463running configure, to aid debugging if configure makes a mistake.
2464
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002465It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002466generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468 $ $0 $@
2469
2470_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002472{
2473cat <<_ASUNAME
2474## --------- ##
2475## Platform. ##
2476## --------- ##
2477
2478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2479uname -m = `(uname -m) 2>/dev/null || echo unknown`
2480uname -r = `(uname -r) 2>/dev/null || echo unknown`
2481uname -s = `(uname -s) 2>/dev/null || echo unknown`
2482uname -v = `(uname -v) 2>/dev/null || echo unknown`
2483
2484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2486
2487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2494
2495_ASUNAME
2496
2497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2498for as_dir in $PATH
2499do
2500 IFS=$as_save_IFS
2501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "PATH: $as_dir"
2503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506} >&5
2507
2508cat >&5 <<_ACEOF
2509
2510
2511## ----------- ##
2512## Core tests. ##
2513## ----------- ##
2514
2515_ACEOF
2516
2517
2518# Keep a trace of the command line.
2519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_configure_args0=
2525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002526ac_must_keep_next=false
2527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002528do
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 for ac_arg
2530 do
2531 case $ac_arg in
2532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2534 | -silent | --silent | --silen | --sile | --sil)
2535 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 esac
2539 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002546 case $ac_arg in
2547 *=* | --config-cache | -C | -disable-* | --disable-* \
2548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2550 | -with-* | --with-* | -without-* | --without-* | --x)
2551 case "$ac_configure_args0 " in
2552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2553 esac
2554 ;;
2555 -* ) ac_must_keep_next=true ;;
2556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 ;;
2560 esac
2561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
Matthias Kloseb9621712010-04-24 17:59:49 +00002563{ ac_configure_args0=; unset ac_configure_args0;}
2564{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# When interrupted or exit'd, cleanup temporary files, and complete
2567# config.log. We remove comments because anyway the quotes in there
2568# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569# WARNING: Use '\'' to represent an apostrophe within the trap.
2570# 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 +00002571trap 'exit_status=$?
2572 # Save into config.log some information that might help in debugging.
2573 {
2574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002575
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002577## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
2580 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581(
2582 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2583 eval ac_val=\$$ac_var
2584 case $ac_val in #(
2585 *${as_nl}*)
2586 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2588$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
2590 case $ac_var in #(
2591 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2593 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac ;;
2595 esac
2596 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2599 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 "s/'\''/'\''\\\\'\'''\''/g;
2602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2603 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002606 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac |
2608 sort
2609)
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002611
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002613## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002615 echo
2616 for ac_var in $ac_subst_vars
2617 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_val=\$$ac_var
2619 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 done | sort
2624 echo
2625
2626 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002630 echo
2631 for ac_var in $ac_subst_files
2632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 eval ac_val=\$$ac_var
2634 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002638 done | sort
2639 echo
2640 fi
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002644## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002645## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 echo
2649 fi
2650 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 $as_echo "$as_me: caught signal $ac_signal"
2652 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654 rm -f core *.core core.conftest.* &&
2655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002658for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002660done
2661ac_signal=0
2662
2663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002665
Matthias Kloseb9621712010-04-24 17:59:49 +00002666$as_echo "/* confdefs.h */" > confdefs.h
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668# Predefined preprocessor variables.
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_NAME "$PACKAGE_NAME"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2676_ACEOF
2677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_VERSION "$PACKAGE_VERSION"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_STRING "$PACKAGE_STRING"
2684_ACEOF
2685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2688_ACEOF
2689
Matthias Kloseb9621712010-04-24 17:59:49 +00002690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_URL "$PACKAGE_URL"
2692_ACEOF
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002696# Prefer an explicitly selected file to automatically selected ones.
2697ac_site_file1=NONE
2698ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002700 # We do not want a PATH search for config.site.
2701 case $CONFIG_SITE in #((
2702 -*) ac_site_file1=./$CONFIG_SITE;;
2703 */*) ac_site_file1=$CONFIG_SITE;;
2704 *) ac_site_file1=./$CONFIG_SITE;;
2705 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 ac_site_file1=$prefix/share/config.site
2708 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709else
Matthias Kloseb9621712010-04-24 17:59:49 +00002710 ac_site_file1=$ac_default_prefix/share/config.site
2711 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002713for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714do
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 test "x$ac_site_file" = xNONE && continue
2716 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2718$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002720 . "$ac_site_file" \
2721 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2723as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002724See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725 fi
2726done
2727
2728if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 # Some versions of bash will fail to source /dev/null (special files
2730 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2731 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2733$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2736 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 esac
2738 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739else
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2741$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 >$cache_file
2743fi
2744
2745# Check that the precious variables saved in the cache have kept the same
2746# value.
2747ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2750 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2752 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 case $ac_old_set,$ac_new_set in
2754 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2756$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 +00002757 ac_cache_corrupted=: ;;
2758 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2760$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_cache_corrupted=: ;;
2762 ,);;
2763 *)
2764 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 # differences in whitespace do not lead to failure.
2766 ac_old_val_w=`echo x $ac_old_val`
2767 ac_new_val_w=`echo x $ac_new_val`
2768 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2770$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2771 ac_cache_corrupted=:
2772 else
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2774$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2775 eval $ac_var=\$ac_old_val
2776 fi
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2778$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2780$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 fi;;
2782 esac
2783 # Pass precious variables to config.status.
2784 if test "$ac_new_set" = set; then
2785 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002786 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 *) ac_arg=$ac_var=$ac_new_val ;;
2788 esac
2789 case " $ac_configure_args " in
2790 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 esac
2793 fi
2794done
2795if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2799$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002800 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002802## -------------------- ##
2803## Main body of script. ##
2804## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002805
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002811
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812
Michael W. Hudson54241132001-12-07 15:38:26 +00002813
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814
Trent Nelson5595ab52012-10-17 04:47:31 -04002815if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002816 # If we're building out-of-tree, we need to make sure the following
2817 # resources get picked up before their $srcdir counterparts.
2818 # Objects/ -> typeslots.inc
2819 # Include/ -> Python-ast.h, graminit.h
2820 # Python/ -> importlib.h
2821 # (A side effect of this is that these resources will automatically be
2822 # regenerated when building out-of-tree, regardless of whether or not
2823 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2824 # off.)
2825 BASECPPFLAGS="-IObjects -IInclude -IPython"
2826else
2827 BASECPPFLAGS=""
2828fi
2829
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002830
2831
2832
2833
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002834if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835then
2836# Extract the first word of "hg", so it can be a program name with args.
2837set dummy hg; ac_word=$2
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2839$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002840if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002841 $as_echo_n "(cached) " >&6
2842else
2843 if test -n "$HAS_HG"; then
2844 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2845else
2846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2847for as_dir in $PATH
2848do
2849 IFS=$as_save_IFS
2850 test -z "$as_dir" && as_dir=.
2851 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002853 ac_cv_prog_HAS_HG="found"
2854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2855 break 2
2856 fi
2857done
2858 done
2859IFS=$as_save_IFS
2860
2861 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2862fi
2863fi
2864HAS_HG=$ac_cv_prog_HAS_HG
2865if test -n "$HAS_HG"; then
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2867$as_echo "$HAS_HG" >&6; }
2868else
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
2871fi
2872
2873
2874else
2875HAS_HG=no-repository
2876fi
2877if test $HAS_HG = found
2878then
2879 HGVERSION="hg id -i \$(srcdir)"
2880 HGTAG="hg id -t \$(srcdir)"
2881 HGBRANCH="hg id -b \$(srcdir)"
2882else
2883 HGVERSION=""
2884 HGTAG=""
2885 HGBRANCH=""
2886fi
2887
2888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002890
2891
Victor Stinnerdddf4842016-06-07 11:21:42 +02002892
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002893ac_aux_dir=
2894for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2895 if test -f "$ac_dir/install-sh"; then
2896 ac_aux_dir=$ac_dir
2897 ac_install_sh="$ac_aux_dir/install-sh -c"
2898 break
2899 elif test -f "$ac_dir/install.sh"; then
2900 ac_aux_dir=$ac_dir
2901 ac_install_sh="$ac_aux_dir/install.sh -c"
2902 break
2903 elif test -f "$ac_dir/shtool"; then
2904 ac_aux_dir=$ac_dir
2905 ac_install_sh="$ac_aux_dir/shtool install -c"
2906 break
2907 fi
2908done
2909if test -z "$ac_aux_dir"; then
2910 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2911fi
2912
2913# These three variables are undocumented and unsupported,
2914# and are intended to be withdrawn in a future Autoconf release.
2915# They can cause serious problems if a builder's source tree is in a directory
2916# whose full name contains unusual characters.
2917ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2918ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2919ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2920
2921
2922# Make sure we can run config.sub.
2923$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2924 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2925
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2927$as_echo_n "checking build system type... " >&6; }
2928if ${ac_cv_build+:} false; then :
2929 $as_echo_n "(cached) " >&6
2930else
2931 ac_build_alias=$build_alias
2932test "x$ac_build_alias" = x &&
2933 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2934test "x$ac_build_alias" = x &&
2935 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2936ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2937 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2938
2939fi
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2941$as_echo "$ac_cv_build" >&6; }
2942case $ac_cv_build in
2943*-*-*) ;;
2944*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2945esac
2946build=$ac_cv_build
2947ac_save_IFS=$IFS; IFS='-'
2948set x $ac_cv_build
2949shift
2950build_cpu=$1
2951build_vendor=$2
2952shift; shift
2953# Remember, the first character of IFS is used to create $*,
2954# except with old shells:
2955build_os=$*
2956IFS=$ac_save_IFS
2957case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2958
2959
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2961$as_echo_n "checking host system type... " >&6; }
2962if ${ac_cv_host+:} false; then :
2963 $as_echo_n "(cached) " >&6
2964else
2965 if test "x$host_alias" = x; then
2966 ac_cv_host=$ac_cv_build
2967else
2968 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2969 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2970fi
2971
2972fi
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2974$as_echo "$ac_cv_host" >&6; }
2975case $ac_cv_host in
2976*-*-*) ;;
2977*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2978esac
2979host=$ac_cv_host
2980ac_save_IFS=$IFS; IFS='-'
2981set x $ac_cv_host
2982shift
2983host_cpu=$1
2984host_vendor=$2
2985shift; shift
2986# Remember, the first character of IFS is used to create $*,
2987# except with old shells:
2988host_os=$*
2989IFS=$ac_save_IFS
2990case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2991
2992
2993
doko@python.orga10e4a92013-01-25 18:45:12 +01002994
2995
Ned Deilyfcbc2462014-08-22 13:32:49 -07002996# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2997rm -f pybuilddir.txt
2998
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999if test "$cross_compiling" = yes; then
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3001$as_echo_n "checking for python interpreter for cross build... " >&6; }
3002 if test -z "$PYTHON_FOR_BUILD"; then
3003 for interp in python$PACKAGE_VERSION python3 python; do
3004 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003005 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003006 break
3007 fi
3008 interp=
3009 done
3010 if test x$interp = x; then
3011 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3012 fi
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3014$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003015 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 +02003016 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003017elif test "$cross_compiling" = maybe; then
3018 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003019else
3020 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3021fi
3022
3023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Benjamin Petersond23f8222009-04-05 19:13:16 +00003025if test "$prefix" != "/"; then
3026 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3027fi
3028
3029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
3031
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003032# We don't use PACKAGE_ variables, and they cause conflicts
3033# with other autoconf-based packages that include Python.h
3034grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3035rm confdefs.h
3036mv confdefs.h.new confdefs.h
3037
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003038
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003039VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003040
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003041# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042
3043SOVERSION=1.0
3044
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003045# The later defininition of _XOPEN_SOURCE disables certain features
3046# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003049
3050
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3053# them.
3054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003056
3057
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3059# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3060# them.
3061
Matthias Kloseb9621712010-04-24 17:59:49 +00003062$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003063
3064
Martin v. Löwisd6320502004-08-12 13:45:08 +00003065# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3066# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003069
3070
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3072# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3073# them.
3074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077
3078
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003079define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003080
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003081# Arguments passed to configure.
3082
3083CONFIG_ARGS="$ac_configure_args"
3084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3086$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003087# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003089 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 case $enableval in
3091 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003092 # Locate the best usable SDK, see Mac/README.txt for more
3093 # information
3094 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003095 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003096 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3098 if test ! -d "${enableval}"
3099 then
3100 enableval=/
3101 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
3105 case $enableval in
3106 no)
3107 UNIVERSALSDK=
3108 enable_universalsdk=
3109 ;;
3110 *)
3111 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003112 if test ! -d "${UNIVERSALSDK}"
3113 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003114 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003115 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 ;;
3117 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003118
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003119
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120else
3121
3122 UNIVERSALSDK=
3123 enable_universalsdk=
3124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003127if test -n "${UNIVERSALSDK}"
3128then
Matthias Kloseb9621712010-04-24 17:59:49 +00003129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3130$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003131else
Matthias Kloseb9621712010-04-24 17:59:49 +00003132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3133$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003139
Ned Deilycbfb9a52012-06-23 16:02:19 -07003140# For backward compatibility reasons we prefer to select '32-bit' if available,
3141# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143if test "`uname -s`" = "Darwin"
3144then
3145 if test -n "${UNIVERSALSDK}"
3146 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003147 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 then
3149 UNIVERSAL_ARCHS="intel"
3150 fi
3151 fi
3152fi
3153
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3156$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
3158# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003159if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003161 UNIVERSAL_ARCHS="$withval"
3162
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163fi
3164
Ned Deily87adb6e2013-10-18 21:09:56 -07003165if test -n "${UNIVERSALSDK}"
3166then
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3168$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3169else
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171$as_echo "no" >&6; }
3172fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003173
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003174
3175# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003176if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003177 withval=$with_framework_name;
3178 PYTHONFRAMEWORK=${withval}
3179 PYTHONFRAMEWORKDIR=${withval}.framework
3180 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3181
3182else
3183
3184 PYTHONFRAMEWORK=Python
3185 PYTHONFRAMEWORKDIR=Python.framework
3186 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3187
3188fi
3189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003191if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003193 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003195 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 esac
3197 case $enableval in
3198 no)
3199 PYTHONFRAMEWORK=
3200 PYTHONFRAMEWORKDIR=no-framework
3201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE"; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003214 ;;
3215 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003216 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003219 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003220 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3221 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225 if test "x${prefix}" = "xNONE" ; then
3226 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228 else
3229 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3230 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
3232 case "${enableval}" in
3233 /System*)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 if test "${prefix}" = "NONE" ; then
3236 # See below
3237 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3238 fi
3239 ;;
3240
3241 /Library*)
3242 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3243 ;;
3244
3245 */Library/Frameworks)
3246 MDIR="`dirname "${enableval}"`"
3247 MDIR="`dirname "${MDIR}"`"
3248 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3249
3250 if test "${prefix}" = "NONE"; then
3251 # User hasn't specified the
3252 # --prefix option, but wants to install
3253 # the framework in a non-default location,
3254 # ensure that the compatibility links get
3255 # installed relative to that prefix as well
3256 # instead of in /usr/local.
3257 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3258 fi
3259 ;;
3260
3261 *)
3262 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3263 ;;
3264 esac
3265
Jack Jansen127e56e2001-09-11 14:41:54 +00003266 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003274 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3275
3276 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003279
Guido van Rossum563e7081996-09-10 18:20:48 +00003280else
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansene578a632001-08-15 01:27:14 +00003282 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003283 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003284 PYTHONFRAMEWORKPREFIX=
3285 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003286 FRAMEWORKINSTALLFIRST=
3287 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003288 FRAMEWORKALTINSTALLFIRST=
3289 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003290 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003291 if test "x${prefix}" = "xNONE" ; then
3292 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3293 else
3294 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3295 fi
Jack Jansene578a632001-08-15 01:27:14 +00003296 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299fi
3300
Thomas Wouters477c8d52006-05-27 19:21:47 +00003301
3302
Michael W. Hudson54241132001-12-07 15:38:26 +00003303
3304
3305
3306
Jack Jansene578a632001-08-15 01:27:14 +00003307
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003308
3309
3310
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003311
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003312
Ned Deilyb8f944f2013-11-21 22:42:25 -08003313
Jack Jansene578a632001-08-15 01:27:14 +00003314##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003315## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003316## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003317##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318# Set name for machine-dependent library files
3319
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3321$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322if test -z "$MACHDEP"
3323then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 # avoid using uname for cross builds
3325 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003326 # ac_sys_system and ac_sys_release are used for setting
3327 # a lot of different things including 'define_xopen_source'
3328 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case "$host" in
3330 *-*-linux*)
3331 ac_sys_system=Linux
3332 ;;
3333 *-*-cygwin*)
3334 ac_sys_system=Cygwin
3335 ;;
3336 *)
3337 # for now, limit cross builds to known configurations
3338 MACHDEP="unknown"
3339 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3340 esac
3341 ac_sys_release=
3342 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003343 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003344 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003345 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003346 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003347 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003348 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003350 fi
3351 ac_md_system=`echo $ac_sys_system |
3352 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3353 ac_md_release=`echo $ac_sys_release |
3354 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3355 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003356
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003357 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003358 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003359 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003360 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003361 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003362 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003363 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003364fi
Guido van Rossum91922671997-10-09 20:24:13 +00003365
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003366
3367if test "$cross_compiling" = yes; then
3368 case "$host" in
3369 *-*-linux*)
3370 case "$host_cpu" in
3371 arm*)
3372 _host_cpu=arm
3373 ;;
3374 *)
3375 _host_cpu=$host_cpu
3376 esac
3377 ;;
3378 *-*-cygwin*)
3379 _host_cpu=
3380 ;;
3381 *)
3382 # for now, limit cross builds to known configurations
3383 MACHDEP="unknown"
3384 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3385 esac
3386 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3387fi
3388
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3390# disable features if it is defined, without any means to access these
3391# features as extensions. For these systems, we skip the definition of
3392# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3393# some feature, make sure there is no alternative way to access this
3394# feature. Also, when using wildcards, make sure you have verified the
3395# need for not defining _XOPEN_SOURCE on all systems matching the
3396# wildcard, and that the wildcard does not include future systems
3397# (which may remove their limitations).
3398case $ac_sys_system/$ac_sys_release in
3399 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3400 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003401 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003402 # In addition, Stefan Krah confirms that issue #1244610 exists through
3403 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003404 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003405 define_xopen_source=no
3406 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3407 # also defined. This can be overridden by defining _BSD_SOURCE
3408 # As this has a different meaning on Linux, only define it on OpenBSD
3409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003411
3412 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003413 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003414 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3415 # also defined. This can be overridden by defining _BSD_SOURCE
3416 # As this has a different meaning on Linux, only define it on OpenBSD
3417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003419
3420 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003421 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3422 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3423 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003424 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 +00003425 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003426 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3427 # request to enable features supported by the standard as a request
3428 # to disable features not supported by the standard. The best way
3429 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3430 # entirely and define __EXTENSIONS__ instead.
3431 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003432 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003433 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3434 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003435 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003436 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 define_xopen_source=no;;
3438 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003439 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003440 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003441 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003442 # On FreeBSD 4, the math functions C89 does not cover are never defined
3443 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3444 FreeBSD/4.*)
3445 define_xopen_source=no;;
3446 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3447 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3448 # identifies itself as Darwin/7.*
3449 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3450 # disables platform specific features beyond repair.
3451 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3452 # has no effect, don't bother defining them
3453 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003454 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003455 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003456 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003457 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3458 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3459 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003460 AIX/4)
3461 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003462 AIX/5)
3463 if test `uname -r` -eq 1; then
3464 define_xopen_source=no
3465 fi
3466 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003467 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3468 # defining NI_NUMERICHOST.
3469 QNX/6.3.2)
3470 define_xopen_source=no
3471 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003472
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003473esac
3474
3475if test $define_xopen_source = yes
3476then
Victor Stinner14d098d2011-09-07 22:29:43 +02003477 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003478
Victor Stinner14d098d2011-09-07 22:29:43 +02003479$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003481
3482 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3483 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3484 # several APIs are not declared. Since this is also needed in some
3485 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003486
Matthias Kloseb9621712010-04-24 17:59:49 +00003487$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003488
3489
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003490
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003491$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003493fi
3494
Christian Heimes647cd872013-12-07 23:39:33 +01003495# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3496case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003497 hp*|HP*)
3498 define_stdc_a1=yes;;
3499 *)
3500 define_stdc_a1=no;;
3501esac
3502
3503if test $define_stdc_a1 = yes
3504then
Christian Heimes647cd872013-12-07 23:39:33 +01003505
3506$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3507
Christian Heimesb02bcae2013-12-08 15:21:08 +01003508fi
Christian Heimes647cd872013-12-07 23:39:33 +01003509
Guido van Rossum91922671997-10-09 20:24:13 +00003510#
3511# SGI compilers allow the specification of the both the ABI and the
3512# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003513# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003514#
3515# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3516# thus supply support for various ABI/ISA combinations. The MACHDEP
3517# variable is also adjusted.
3518#
3519
3520if test ! -z "$SGI_ABI"
3521then
3522 CC="cc $SGI_ABI"
3523 LDFLAGS="$SGI_ABI $LDFLAGS"
3524 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3527$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003528
Jack Jansen6b08a402004-06-03 12:41:45 +00003529# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3530# it may influence the way we can build extensions, so distutils
3531# needs to check it
3532
Thomas Wouters477c8d52006-05-27 19:21:47 +00003533
Jack Jansen6b08a402004-06-03 12:41:45 +00003534CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003535EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003536
Guido van Rossum627b2d71993-12-24 10:39:16 +00003537# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003538
3539# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3540# for debug/optimization stuff. BASECFLAGS is for flags that are required
3541# just to get things to compile and link. Users are free to override OPT
3542# when running configure or make. The build should not break if they do.
3543# BASECFLAGS should generally not be messed with, however.
3544
3545# XXX shouldn't some/most/all of this code be merged with the stuff later
3546# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3548$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003551if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003554 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003555 without_gcc=yes;;
3556 yes) CC=gcc
3557 without_gcc=no;;
3558 *) CC=$withval
3559 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003560 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003564 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003565 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003566 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003567 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568fi
3569
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3571$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003572
Zachary Ware5af85642015-12-21 12:09:17 -06003573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3574$as_echo_n "checking for --with-icc... " >&6; }
3575
3576# Check whether --with-icc was given.
3577if test "${with_icc+set}" = set; then :
3578 withval=$with_icc;
3579 case $withval in
3580 no) CC=${CC:-cc}
3581 with_icc=no;;
3582 yes) CC=icc
3583 CXX=icpc
3584 with_icc=yes;;
3585 *) CC=$withval
3586 with_icc=$withval;;
3587 esac
3588else
3589
3590 with_icc=no
3591fi
3592
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3594$as_echo "$with_icc" >&6; }
3595
Guido van Rossum8b131c51995-03-09 14:10:13 +00003596# If the user switches compilers, we can't believe the cache
3597if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3598then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003599 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003600(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003601fi
3602
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003603# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3604# when the compiler supports them, but we don't always want -O2, and
3605# we set -g later.
3606if test -z "$CFLAGS"; then
3607 CFLAGS=
3608fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003609
3610if test "$ac_sys_system" = "Darwin"
3611then
3612 # Compiler selection on MacOSX is more complicated than
3613 # AC_PROG_CC can handle, see Mac/README.txt for more
3614 # information
3615 if test -z "${CC}"
3616 then
3617 found_gcc=
3618 found_clang=
3619 as_save_IFS=$IFS; IFS=:
3620 for as_dir in $PATH
3621 do
3622 IFS=$as_save_IFS
3623 if test -x $as_dir/gcc; then
3624 if test -z "${found_gcc}"; then
3625 found_gcc=$as_dir/gcc
3626 fi
3627 fi
3628 if test -x $as_dir/clang; then
3629 if test -z "${found_clang}"; then
3630 found_clang=$as_dir/clang
3631 fi
3632 fi
3633 done
3634 IFS=$as_save_IFS
3635
3636 if test -n "$found_gcc" -a -n "$found_clang"
3637 then
3638 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3639 then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3641$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3642 CC="$found_clang"
3643 CXX="$found_clang++"
3644 fi
3645
3646
3647 elif test -z "$found_gcc" -a -n "$found_clang"
3648 then
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3650$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3651 CC="$found_clang"
3652 CXX="$found_clang++"
3653
3654 elif test -z "$found_gcc" -a -z "$found_clang"
3655 then
3656 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3657 if test -n "${found_clang}"
3658 then
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3660$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3661 CC="${found_clang}"
3662 CXX="`/usr/bin/xcrun -find clang++`"
3663
3664 # else: use default behaviour
3665 fi
3666 fi
3667 fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3676set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003679if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
Martin v. Löwis11437992002-04-12 09:54:03 +00003685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700fi
3701fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003702CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003703if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711
Martin v. Löwis11437992002-04-12 09:54:03 +00003712fi
3713if test -z "$ac_cv_prog_CC"; then
3714 ac_ct_CC=$CC
3715 # Extract the first word of "gcc", so it can be a program name with args.
3716set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003719if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003721else
3722 if test -n "$ac_ct_CC"; then
3723 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3724else
3725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
3740fi
3741fi
3742ac_ct_CC=$ac_cv_prog_ac_ct_CC
3743if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3745$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 if test "x$ac_ct_CC" = x; then
3752 CC=""
3753 else
3754 case $cross_compiling:$ac_tool_warned in
3755yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758ac_tool_warned=yes ;;
3759esac
3760 CC=$ac_ct_CC
3761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003764fi
3765
Jack Jansendd19cf82001-12-06 22:36:17 +00003766if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 if test -n "$ac_tool_prefix"; then
3768 # 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 +00003769set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $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 +00003787 break 2
3788 fi
3789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807if test -z "$CC"; then
3808 # Extract the first word of "cc", so it can be a program name with args.
3809set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003818 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3827 ac_prog_rejected=yes
3828 continue
3829 fi
3830 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003838if test $ac_prog_rejected = yes; then
3839 # We found a bogon in the path, so make sure we never use it.
3840 set dummy $ac_cv_prog_CC
3841 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003843 # We chose a different compiler from the bogus one.
3844 # However, it has the same basename, so the bogon will be chosen
3845 # first if we set CC to just the basename; use the full file name.
3846 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003847 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003848 fi
3849fi
3850fi
3851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003852CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003853if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003859fi
3860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863if test -z "$CC"; then
3864 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 do
3867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003871if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873else
3874 if test -n "$CC"; then
3875 ac_cv_prog_CC="$CC" # Let the user override the test.
3876else
Martin v. Löwis11437992002-04-12 09:54:03 +00003877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 $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 +00003886 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888done
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
3892fi
3893fi
3894CC=$ac_cv_prog_CC
3895if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3897$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003898else
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003901fi
3902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 test -n "$CC" && break
3905 done
3906fi
3907if test -z "$CC"; then
3908 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003910do
3911 # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003915if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003917else
3918 if test -n "$ac_ct_CC"; then
3919 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3920else
3921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH
3923do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 $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 +00003930 break 2
3931 fi
3932done
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003935
Martin v. Löwis11437992002-04-12 09:54:03 +00003936fi
3937fi
3938ac_ct_CC=$ac_cv_prog_ac_ct_CC
3939if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3941$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003942else
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 test -n "$ac_ct_CC" && break
3949done
Michael W. Hudson54241132001-12-07 15:38:26 +00003950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 if test "x$ac_ct_CC" = x; then
3952 CC=""
3953 else
3954 case $cross_compiling:$ac_tool_warned in
3955yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_tool_warned=yes ;;
3959esac
3960 CC=$ac_ct_CC
3961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003962fi
3963
3964fi
3965
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003971
3972# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3974set X $ac_compile
3975ac_compiler=$2
3976for ac_option in --version -v -V -qversion; do
3977 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 if test -s conftest.err; then
3987 sed '10a\
3988... rest of stderr output deleted ...
3989 10q' conftest.err >conftest.er1
3990 cat conftest.er1 >&5
3991 fi
3992 rm -f conftest.er1 conftest.err
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995done
Martin v. Löwis11437992002-04-12 09:54:03 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003999
Martin v. Löwis11437992002-04-12 09:54:03 +00004000int
4001main ()
4002{
4003
4004 ;
4005 return 0;
4006}
4007_ACEOF
4008ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004010# Try to create an executable without -o first, disregard a.out.
4011# It will help us diagnose broken compilers, and finding out an intuition
4012# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4014$as_echo_n "checking whether the C compiler works... " >&6; }
4015ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016
4017# The possible output files:
4018ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020ac_rmfiles=
4021for ac_file in $ac_files
4022do
4023 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4026 esac
4027done
4028rm -f $ac_rmfiles
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4042# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4043# in a Makefile. We should not override ac_cv_exeext if it was cached,
4044# so that the user can short-circuit this test for compilers unknown to
4045# Autoconf.
4046for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004047do
4048 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 ;;
4052 [ab].out )
4053 # We found the default executable, but exeext='' is most
4054 # certainly right.
4055 break;;
4056 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058 then :; else
4059 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 fi
4061 # We set ac_cv_exeext here because the later test for it is not
4062 # safe: cross compilers may not add the suffix if given an `-o'
4063 # argument, so we may need to know it at that point already.
4064 # Even if this section looks crufty: it has the advantage of
4065 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066 break;;
4067 * )
4068 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 esac
4070done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071test "$ac_cv_exeext" = no && ac_cv_exeext=
4072
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004073else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074 ac_file=''
4075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004076if test -z "$ac_file"; then :
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078$as_echo "no" >&6; }
4079$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004080sed 's/^/| /' conftest.$ac_ext >&5
4081
Matthias Kloseb9621712010-04-24 17:59:49 +00004082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004084as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004085See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4088$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4091$as_echo_n "checking for C compiler default output file name... " >&6; }
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4093$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4099$as_echo_n "checking for suffix of executables... " >&6; }
4100if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4112# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4113# work properly (i.e., refer to `conftest.exe'), while it won't with
4114# `rm'.
4115for ac_file in conftest.exe conftest conftest.*; do
4116 test -f "$ac_file" || continue
4117 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4120 break;;
4121 * ) break;;
4122 esac
4123done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004127as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130rm -f conftest conftest$ac_cv_exeext
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4132$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133
4134rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135EXEEXT=$ac_cv_exeext
4136ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <stdio.h>
4140int
4141main ()
4142{
4143FILE *f = fopen ("conftest.out", "w");
4144 return ferror (f) || fclose (f) != 0;
4145
4146 ;
4147 return 0;
4148}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004150ac_clean_files="$ac_clean_files conftest.out"
4151# Check that the compiler produces executables we can run. If not, either
4152# the compiler is broken, or we cross compile.
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4154$as_echo_n "checking whether we are cross compiling... " >&6; }
4155if test "$cross_compiling" != yes; then
4156 { { ac_try="$ac_link"
4157case "(($ac_try" in
4158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4159 *) ac_try_echo=$ac_try;;
4160esac
4161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4162$as_echo "$ac_try_echo"; } >&5
4163 (eval "$ac_link") 2>&5
4164 ac_status=$?
4165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4166 test $ac_status = 0; }
4167 if { ac_try='./conftest$ac_cv_exeext'
4168 { { case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171esac
4172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4173$as_echo "$ac_try_echo"; } >&5
4174 (eval "$ac_try") 2>&5
4175 ac_status=$?
4176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177 test $ac_status = 0; }; }; then
4178 cross_compiling=no
4179 else
4180 if test "$cross_compiling" = maybe; then
4181 cross_compiling=yes
4182 else
4183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004185as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004186If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 fi
4189 fi
4190fi
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4192$as_echo "$cross_compiling" >&6; }
4193
4194rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4195ac_clean_files=$ac_clean_files_save
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4197$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004198if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 $as_echo_n "(cached) " >&6
4200else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
4212rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214case "(($ac_try" in
4215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4216 *) ac_try_echo=$ac_try;;
4217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4219$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4223 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 for ac_file in conftest.o conftest.obj conftest.*; do
4225 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4229 break;;
4230 esac
4231done
4232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004234sed 's/^/| /' conftest.$ac_ext >&5
4235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004238as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004239See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004241rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4244$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245OBJEXT=$ac_cv_objext
4246ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4248$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004251else
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004254
Martin v. Löwis11437992002-04-12 09:54:03 +00004255int
4256main ()
4257{
4258#ifndef __GNUC__
4259 choke me
4260#endif
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 ac_compiler_gnu=yes
4268else
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004272ac_cv_c_compiler_gnu=$ac_compiler_gnu
4273
4274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4276$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4277if test $ac_compiler_gnu = yes; then
4278 GCC=yes
4279else
4280 GCC=
4281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004282ac_test_CFLAGS=${CFLAGS+set}
4283ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4285$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004286if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004288else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 ac_save_c_werror_flag=$ac_c_werror_flag
4290 ac_c_werror_flag=yes
4291 ac_cv_prog_cc_g=no
4292 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296int
4297main ()
4298{
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004305 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306else
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 CFLAGS=""
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309/* end confdefs.h. */
4310
4311int
4312main ()
4313{
4314
4315 ;
4316 return 0;
4317}
4318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004319if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321else
4322 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* end confdefs.h. */
4326
4327int
4328main ()
4329{
4330
4331 ;
4332 return 0;
4333}
4334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4343 ac_c_werror_flag=$ac_save_c_werror_flag
4344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4346$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004347if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004349elif test $ac_cv_prog_cc_g = yes; then
4350 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004351 CFLAGS="-g -O2"
4352 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004353 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354 fi
4355else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004356 if test "$GCC" = yes; then
4357 CFLAGS="-O2"
4358 else
4359 CFLAGS=
4360 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4363$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004364if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004366else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004368ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370/* end confdefs.h. */
4371#include <stdarg.h>
4372#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004373struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4375struct buf { int x; };
4376FILE * (*rcsopen) (struct buf *, struct stat *, int);
4377static char *e (p, i)
4378 char **p;
4379 int i;
4380{
4381 return p[i];
4382}
4383static char *f (char * (*g) (char **, int), char **p, ...)
4384{
4385 char *s;
4386 va_list v;
4387 va_start (v,p);
4388 s = g (p, va_arg (v,int));
4389 va_end (v);
4390 return s;
4391}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392
4393/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4394 function prototypes and stuff, but not '\xHH' hex character constants.
4395 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4398 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004400int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4403 inside strings and character constants. */
4404#define FOO(x) 'x'
4405int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406
Skip Montanaro6dead952003-09-25 14:50:04 +00004407int test (int i, double x);
4408struct s1 {int (*f) (int a);};
4409struct s2 {int (*f) (double a);};
4410int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4411int argc;
4412char **argv;
4413int
4414main ()
4415{
4416return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 ;
4418 return 0;
4419}
4420_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423do
4424 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428rm -f core conftest.err conftest.$ac_objext
4429 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004432CC=$ac_save_CC
4433
4434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435# AC_CACHE_VAL
4436case "x$ac_cv_prog_cc_c89" in
4437 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4439$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4442$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004443 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4446$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004447esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004448if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004449
Matthias Kloseb9621712010-04-24 17:59:49 +00004450fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004451
Martin v. Löwis11437992002-04-12 09:54:03 +00004452ac_ext=c
4453ac_cpp='$CPP $CPPFLAGS'
4454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004458ac_ext=c
4459ac_cpp='$CPP $CPPFLAGS'
4460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4462ac_compiler_gnu=$ac_cv_c_compiler_gnu
4463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4464$as_echo_n "checking how to run the C preprocessor... " >&6; }
4465# On Suns, sometimes $CPP names a directory.
4466if test -n "$CPP" && test -d "$CPP"; then
4467 CPP=
4468fi
4469if test -z "$CPP"; then
4470 if ${ac_cv_prog_CPP+:} false; then :
4471 $as_echo_n "(cached) " >&6
4472else
4473 # Double quotes because CPP needs to be expanded
4474 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4475 do
4476 ac_preproc_ok=false
4477for ac_c_preproc_warn_flag in '' yes
4478do
4479 # Use a header file that comes with gcc, so configuring glibc
4480 # with a fresh cross-compiler works.
4481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482 # <limits.h> exists even on freestanding compilers.
4483 # On the NeXT, cc -E runs the code through the compiler's parser,
4484 # not just through cpp. "Syntax error" is here to catch this case.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#ifdef __STDC__
4488# include <limits.h>
4489#else
4490# include <assert.h>
4491#endif
4492 Syntax error
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495
4496else
4497 # Broken: fails on valid input.
4498continue
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502 # OK, works on sane cases. Now check whether nonexistent headers
4503 # can be detected and how.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ac_nonexistent.h>
4507_ACEOF
4508if ac_fn_c_try_cpp "$LINENO"; then :
4509 # Broken: success on invalid input.
4510continue
4511else
4512 # Passes both tests.
4513ac_preproc_ok=:
4514break
4515fi
4516rm -f conftest.err conftest.i conftest.$ac_ext
4517
4518done
4519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4520rm -f conftest.i conftest.err conftest.$ac_ext
4521if $ac_preproc_ok; then :
4522 break
4523fi
4524
4525 done
4526 ac_cv_prog_CPP=$CPP
4527
4528fi
4529 CPP=$ac_cv_prog_CPP
4530else
4531 ac_cv_prog_CPP=$CPP
4532fi
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4534$as_echo "$CPP" >&6; }
4535ac_preproc_ok=false
4536for ac_c_preproc_warn_flag in '' yes
4537do
4538 # Use a header file that comes with gcc, so configuring glibc
4539 # with a fresh cross-compiler works.
4540 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4541 # <limits.h> exists even on freestanding compilers.
4542 # On the NeXT, cc -E runs the code through the compiler's parser,
4543 # not just through cpp. "Syntax error" is here to catch this case.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#ifdef __STDC__
4547# include <limits.h>
4548#else
4549# include <assert.h>
4550#endif
4551 Syntax error
4552_ACEOF
4553if ac_fn_c_try_cpp "$LINENO"; then :
4554
4555else
4556 # Broken: fails on valid input.
4557continue
4558fi
4559rm -f conftest.err conftest.i conftest.$ac_ext
4560
4561 # OK, works on sane cases. Now check whether nonexistent headers
4562 # can be detected and how.
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <ac_nonexistent.h>
4566_ACEOF
4567if ac_fn_c_try_cpp "$LINENO"; then :
4568 # Broken: success on invalid input.
4569continue
4570else
4571 # Passes both tests.
4572ac_preproc_ok=:
4573break
4574fi
4575rm -f conftest.err conftest.i conftest.$ac_ext
4576
4577done
4578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4579rm -f conftest.i conftest.err conftest.$ac_ext
4580if $ac_preproc_ok; then :
4581
4582else
4583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4585as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4586See \`config.log' for more details" "$LINENO" 5; }
4587fi
4588
4589ac_ext=c
4590ac_cpp='$CPP $CPPFLAGS'
4591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4593ac_compiler_gnu=$ac_cv_c_compiler_gnu
4594
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4596$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4597if ${ac_cv_path_GREP+:} false; then :
4598 $as_echo_n "(cached) " >&6
4599else
4600 if test -z "$GREP"; then
4601 ac_path_GREP_found=false
4602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4605do
4606 IFS=$as_save_IFS
4607 test -z "$as_dir" && as_dir=.
4608 for ac_prog in grep ggrep; do
4609 for ac_exec_ext in '' $ac_executable_extensions; do
4610 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4611 as_fn_executable_p "$ac_path_GREP" || continue
4612# Check for GNU ac_path_GREP and select it if it is found.
4613 # Check for GNU $ac_path_GREP
4614case `"$ac_path_GREP" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4617*)
4618 ac_count=0
4619 $as_echo_n 0123456789 >"conftest.in"
4620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
4625 $as_echo 'GREP' >> "conftest.nl"
4626 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4628 as_fn_arith $ac_count + 1 && ac_count=$as_val
4629 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_GREP="$ac_path_GREP"
4632 ac_path_GREP_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
4640 $ac_path_GREP_found && break 3
4641 done
4642 done
4643 done
4644IFS=$as_save_IFS
4645 if test -z "$ac_cv_path_GREP"; then
4646 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4647 fi
4648else
4649 ac_cv_path_GREP=$GREP
4650fi
4651
4652fi
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4654$as_echo "$ac_cv_path_GREP" >&6; }
4655 GREP="$ac_cv_path_GREP"
4656
4657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4662$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004665if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668 case $withval in
4669 no) with_cxx_main=no
4670 MAINCC='$(CC)';;
4671 yes) with_cxx_main=yes
4672 MAINCC='$(CXX)';;
4673 *) with_cxx_main=yes
4674 MAINCC=$withval
4675 if test -z "$CXX"
4676 then
4677 CXX=$withval
4678 fi;;
4679 esac
4680else
4681
4682 with_cxx_main=no
4683 MAINCC='$(CC)'
4684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685fi
4686
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4688$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689
4690preset_cxx="$CXX"
4691if test -z "$CXX"
4692then
4693 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 gcc) if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}g++; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_CXX+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701else
4702 case $CXX in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in notfound
4709do
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004714 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4717 fi
4718done
4719 done
4720IFS=$as_save_IFS
4721
4722 ;;
4723esac
4724fi
4725CXX=$ac_cv_path_CXX
4726if test -n "$CXX"; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4728$as_echo "$CXX" >&6; }
4729else
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735fi
4736if test -z "$ac_cv_path_CXX"; then
4737 ac_pt_CXX=$CXX
4738 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742if ${ac_cv_path_ac_pt_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 case $ac_pt_CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4769if test -n "$ac_pt_CXX"; then
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4771$as_echo "$ac_pt_CXX" >&6; }
4772else
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777 if test "x$ac_pt_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_pt_CXX
4787 fi
4788else
4789 CXX="$ac_cv_path_CXX"
4790fi
4791 ;;
4792 cc) if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}c++; ac_word=$2
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004797if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799else
4800 case $CXX in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in notfound
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 break 2
4815 fi
4816done
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821esac
4822fi
4823CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4826$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827else
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832
4833fi
4834if test -z "$ac_cv_path_CXX"; then
4835 ac_pt_CXX=$CXX
4836 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 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 +00004846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
4852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4867if test -n "$ac_pt_CXX"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4869$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 if test "x$ac_pt_CXX" = x; then
4876 CXX="c++"
4877 else
4878 case $cross_compiling:$ac_tool_warned in
4879yes:)
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4882ac_tool_warned=yes ;;
4883esac
4884 CXX=$ac_pt_CXX
4885 fi
4886else
4887 CXX="$ac_cv_path_CXX"
4888fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004889 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 clang|*/clang) if test -n "$ac_tool_prefix"; then
4891 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4892set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CXX+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897else
4898 case $CXX in
4899 [\\/]* | ?:[\\/]*)
4900 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4901 ;;
4902 *)
4903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in notfound
4905do
4906 IFS=$as_save_IFS
4907 test -z "$as_dir" && as_dir=.
4908 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912 break 2
4913 fi
4914done
4915 done
4916IFS=$as_save_IFS
4917
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
4919esac
4920fi
4921CXX=$ac_cv_path_CXX
4922if test -n "$CXX"; then
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4924$as_echo "$CXX" >&6; }
4925else
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930
4931fi
4932if test -z "$ac_cv_path_CXX"; then
4933 ac_pt_CXX=$CXX
4934 # Extract the first word of "clang++", so it can be a program name with args.
4935set dummy clang++; ac_word=$2
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_ac_pt_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
4941 case $ac_pt_CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
4950 test -z "$as_dir" && as_dir=.
4951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004953 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
4961 ;;
4962esac
4963fi
4964ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4965if test -n "$ac_pt_CXX"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4967$as_echo "$ac_pt_CXX" >&6; }
4968else
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973 if test "x$ac_pt_CXX" = x; then
4974 CXX="clang++"
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4980ac_tool_warned=yes ;;
4981esac
4982 CXX=$ac_pt_CXX
4983 fi
4984else
4985 CXX="$ac_cv_path_CXX"
4986fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004987 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004988 icc|*/icc) if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}icpc; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CXX+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
4996 case $CXX in
4997 [\\/]* | ?:[\\/]*)
4998 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4999 ;;
5000 *)
5001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in notfound
5003do
5004 IFS=$as_save_IFS
5005 test -z "$as_dir" && as_dir=.
5006 for ac_exec_ext in '' $ac_executable_extensions; do
5007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010 break 2
5011 fi
5012done
5013 done
5014IFS=$as_save_IFS
5015
5016 ;;
5017esac
5018fi
5019CXX=$ac_cv_path_CXX
5020if test -n "$CXX"; then
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5022$as_echo "$CXX" >&6; }
5023else
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029fi
5030if test -z "$ac_cv_path_CXX"; then
5031 ac_pt_CXX=$CXX
5032 # Extract the first word of "icpc", so it can be a program name with args.
5033set dummy icpc; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_ac_pt_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
5039 case $ac_pt_CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5063if test -n "$ac_pt_CXX"; then
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5065$as_echo "$ac_pt_CXX" >&6; }
5066else
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071 if test "x$ac_pt_CXX" = x; then
5072 CXX="icpc"
5073 else
5074 case $cross_compiling:$ac_tool_warned in
5075yes:)
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5078ac_tool_warned=yes ;;
5079esac
5080 CXX=$ac_pt_CXX
5081 fi
5082else
5083 CXX="$ac_cv_path_CXX"
5084fi
5085 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 esac
5087 if test "$CXX" = "notfound"
5088 then
5089 CXX=""
5090 fi
5091fi
5092if test -z "$CXX"
5093then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 if test -n "$ac_tool_prefix"; then
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096 do
5097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005101if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103else
5104 if test -n "$CXX"; then
5105 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116 break 2
5117 fi
5118done
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122fi
5123fi
5124CXX=$ac_cv_prog_CXX
5125if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128else
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 test -n "$CXX" && break
5135 done
5136fi
5137if test -z "$CXX"; then
5138 ac_ct_CXX=$CXX
5139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5146 $as_echo_n "(cached) " >&6
5147else
5148 if test -n "$ac_ct_CXX"; then
5149 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
5155 test -z "$as_dir" && as_dir=.
5156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005158 ac_cv_prog_ac_ct_CXX="$ac_prog"
5159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160 break 2
5161 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 done
5164IFS=$as_save_IFS
5165
5166fi
5167fi
5168ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5169if test -n "$ac_ct_CXX"; then
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5171$as_echo "$ac_ct_CXX" >&6; }
5172else
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
5175fi
5176
5177
5178 test -n "$ac_ct_CXX" && break
5179done
5180
5181 if test "x$ac_ct_CXX" = x; then
5182 CXX="notfound"
5183 else
5184 case $cross_compiling:$ac_tool_warned in
5185yes:)
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5188ac_tool_warned=yes ;;
5189esac
5190 CXX=$ac_ct_CXX
5191 fi
5192fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 if test "$CXX" = "notfound"
5195 then
5196 CXX=""
5197 fi
5198fi
5199if test "$preset_cxx" != "$CXX"
5200then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005201 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202
5203 By default, distutils will build C++ extension modules with \"$CXX\".
5204 If this is not intended, then set CXX on the configure command line.
5205 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005206$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211fi
5212
5213
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5215
5216
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5218$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5219cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef bfin
5221#undef cris
5222#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef hppa
5225#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005228#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef unix
5231#if defined(__linux__)
5232# if defined(__x86_64__) && defined(__LP64__)
5233 x86_64-linux-gnu
5234# elif defined(__x86_64__) && defined(__ILP32__)
5235 x86_64-linux-gnux32
5236# elif defined(__i386__)
5237 i386-linux-gnu
5238# elif defined(__aarch64__) && defined(__AARCH64EL__)
5239# if defined(__ILP32__)
5240 aarch64_ilp32-linux-gnu
5241# else
5242 aarch64-linux-gnu
5243# endif
5244# elif defined(__aarch64__) && defined(__AARCH64EB__)
5245# if defined(__ILP32__)
5246 aarch64_be_ilp32-linux-gnu
5247# else
5248 aarch64_be-linux-gnu
5249# endif
5250# elif defined(__alpha__)
5251 alpha-linux-gnu
5252# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabihf
5255# else
5256 armeb-linux-gnueabihf
5257# endif
5258# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabi
5261# else
5262 armeb-linux-gnueabi
5263# endif
5264# elif defined(__hppa__)
5265 hppa-linux-gnu
5266# elif defined(__ia64__)
5267 ia64-linux-gnu
5268# elif defined(__m68k__) && !defined(__mcoldfire__)
5269 m68k-linux-gnu
5270# elif defined(__mips_hard_float) && defined(_MIPSEL)
5271# if _MIPS_SIM == _ABIO32
5272 mipsel-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64el-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64el-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__mips_hard_float)
5281# if _MIPS_SIM == _ABIO32
5282 mips-linux-gnu
5283# elif _MIPS_SIM == _ABIN32
5284 mips64-linux-gnuabin32
5285# elif _MIPS_SIM == _ABI64
5286 mips64-linux-gnuabi64
5287# else
5288# error unknown platform triplet
5289# endif
5290# elif defined(__or1k__)
5291 or1k-linux-gnu
5292# elif defined(__powerpc__) && defined(__SPE__)
5293 powerpc-linux-gnuspe
5294# elif defined(__powerpc64__)
5295# if defined(__LITTLE_ENDIAN__)
5296 powerpc64le-linux-gnu
5297# else
5298 powerpc64-linux-gnu
5299# endif
5300# elif defined(__powerpc__)
5301 powerpc-linux-gnu
5302# elif defined(__s390x__)
5303 s390x-linux-gnu
5304# elif defined(__s390__)
5305 s390-linux-gnu
5306# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5307 sh4-linux-gnu
5308# elif defined(__sparc__) && defined(__arch64__)
5309 sparc64-linux-gnu
5310# elif defined(__sparc__)
5311 sparc-linux-gnu
5312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__FreeBSD_kernel__)
5316# if defined(__LP64__)
5317 x86_64-kfreebsd-gnu
5318# elif defined(__i386__)
5319 i386-kfreebsd-gnu
5320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__gnu_hurd__)
5324 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005325#elif defined(__APPLE__)
5326 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327#else
5328# error unknown platform triplet
5329#endif
5330
5331EOF
5332
5333if $CPP conftest.c >conftest.out 2>/dev/null; then
5334 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5336$as_echo "$PLATFORM_TRIPLET" >&6; }
5337else
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5339$as_echo "none" >&6; }
5340fi
5341rm -f conftest.c conftest.out
5342
5343if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5344 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5345 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5346 fi
5347fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005348if test x$PLATFORM_TRIPLET = x; then
5349 PLATDIR=plat-$MACHDEP
5350else
5351 PLATDIR=plat-$PLATFORM_TRIPLET
5352fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353
5354
doko@ubuntu.com55532312016-06-14 08:55:19 +02005355if test x$MULTIARCH != x; then
5356 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5357fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005358
5359
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5361$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5362save_LDFLAGS="$LDFLAGS"
5363LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005364
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h. */
5367
5368int
5369main ()
5370{
5371
5372 ;
5373 return 0;
5374}
5375_ACEOF
5376if ac_fn_c_try_link "$LINENO"; then :
5377 NO_AS_NEEDED="-Wl,--no-as-needed"
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5379$as_echo "yes" >&6; }
5380else
5381 NO_AS_NEEDED=""
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385rm -f core conftest.err conftest.$ac_objext \
5386 conftest$ac_exeext conftest.$ac_ext
5387LDFLAGS="$save_LDFLAGS"
5388
5389
5390
5391# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5394$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005395if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5399 then ac_cv_path_EGREP="$GREP -E"
5400 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 # Loop through the user's path and test for each of PROGNAME-LIST
5404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5406do
5407 IFS=$as_save_IFS
5408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 for ac_prog in egrep; do
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005412 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005413# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 # Check for GNU $ac_path_EGREP
5415case `"$ac_path_EGREP" --version 2>&1` in
5416*GNU*)
5417 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5418*)
5419 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 while :
5422 do
5423 cat "conftest.in" "conftest.in" >"conftest.tmp"
5424 mv "conftest.tmp" "conftest.in"
5425 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5428 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5431 # Best one so far, save it but keep looking for a better one
5432 ac_cv_path_EGREP="$ac_path_EGREP"
5433 ac_path_EGREP_max=$ac_count
5434 fi
5435 # 10*(2^10) chars as input seems more than enough
5436 test $ac_count -gt 10 && break
5437 done
5438 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5439esac
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $ac_path_EGREP_found && break 3
5442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005447 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 +00005448 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449else
5450 ac_cv_path_EGREP=$EGREP
5451fi
5452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 fi
5454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5456$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005458
5459
Matthias Kloseb9621712010-04-24 17:59:49 +00005460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5461$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005462if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 $as_echo_n "(cached) " >&6
5464else
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005467#include <stdlib.h>
5468#include <stdarg.h>
5469#include <string.h>
5470#include <float.h>
5471
5472int
5473main ()
5474{
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480if ac_fn_c_try_compile "$LINENO"; then :
5481 ac_cv_header_stdc=yes
5482else
5483 ac_cv_header_stdc=no
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486
5487if test $ac_cv_header_stdc = yes; then
5488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490/* end confdefs.h. */
5491#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005492
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497else
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005500rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
Matthias Kloseb9621712010-04-24 17:59:49 +00005502fi
5503
5504if test $ac_cv_header_stdc = yes; then
5505 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508#include <stdlib.h>
5509
5510_ACEOF
5511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5512 $EGREP "free" >/dev/null 2>&1; then :
5513
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f conftest*
5518
5519fi
5520
5521if test $ac_cv_header_stdc = yes; then
5522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5523 if test "$cross_compiling" = yes; then :
5524 :
5525else
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527/* end confdefs.h. */
5528#include <ctype.h>
5529#include <stdlib.h>
5530#if ((' ' & 0x0FF) == 0x020)
5531# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5532# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5533#else
5534# define ISLOWER(c) \
5535 (('a' <= (c) && (c) <= 'i') \
5536 || ('j' <= (c) && (c) <= 'r') \
5537 || ('s' <= (c) && (c) <= 'z'))
5538# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5539#endif
5540
5541#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5542int
5543main ()
5544{
5545 int i;
5546 for (i = 0; i < 256; i++)
5547 if (XOR (islower (i), ISLOWER (i))
5548 || toupper (i) != TOUPPER (i))
5549 return 2;
5550 return 0;
5551}
5552_ACEOF
5553if ac_fn_c_try_run "$LINENO"; then :
5554
5555else
5556 ac_cv_header_stdc=no
5557fi
5558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5559 conftest.$ac_objext conftest.beam conftest.$ac_ext
5560fi
5561
5562fi
5563fi
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5565$as_echo "$ac_cv_header_stdc" >&6; }
5566if test $ac_cv_header_stdc = yes; then
5567
5568$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5569
5570fi
5571
5572# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5573for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5574 inttypes.h stdint.h unistd.h
5575do :
5576 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5577ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5578"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005579if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 cat >>confdefs.h <<_ACEOF
5581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5582_ACEOF
5583
5584fi
5585
5586done
5587
5588
5589
5590 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 +02005591if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 MINIX=yes
5593else
5594 MINIX=
5595fi
5596
5597
5598 if test "$MINIX" = yes; then
5599
5600$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5601
5602
5603$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5604
5605
5606$as_echo "#define _MINIX 1" >>confdefs.h
5607
5608 fi
5609
5610
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5612$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005613if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 $as_echo_n "(cached) " >&6
5615else
5616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5617/* end confdefs.h. */
5618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005619# define __EXTENSIONS__ 1
5620 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005621int
5622main ()
5623{
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629if ac_fn_c_try_compile "$LINENO"; then :
5630 ac_cv_safe_to_define___extensions__=yes
5631else
5632 ac_cv_safe_to_define___extensions__=no
5633fi
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635fi
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5637$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5638 test $ac_cv_safe_to_define___extensions__ = yes &&
5639 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5640
5641 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5642
5643 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5646
5647 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5648
5649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651# Check for unsupported systems
5652case $ac_sys_system/$ac_sys_release in
5653atheos*|Linux*/1*)
5654 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5655 echo See README for details.
5656 exit 1;;
5657esac
5658
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5661$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 withval=$with_suffix;
5666 case $withval in
5667 no) EXEEXT=;;
5668 yes) EXEEXT=.exe;;
5669 *) EXEEXT=$withval;;
5670 esac
5671fi
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5674$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676# Test whether we're running on a non-case-sensitive system, in which
5677# case we give a warning if no ext is given
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5680$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681if test ! -d CaseSensitiveTestDir; then
5682mkdir CaseSensitiveTestDir
5683fi
5684
5685if test -d casesensitivetestdir
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=.exe
5690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 BUILDEXEEXT=$EXEEXT
5694fi
5695rmdir CaseSensitiveTestDir
5696
5697case $MACHDEP in
5698bsdos*)
5699 case $CC in
5700 gcc) CC="$CC -D_HAVE_BSDI";;
5701 esac;;
5702esac
5703
5704case $ac_sys_system in
5705hp*|HP*)
5706 case $CC in
5707 cc|*/cc) CC="$CC -Ae";;
5708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709esac
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5713$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test -z "$LIBRARY"
5715then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005716 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5719$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# LDLIBRARY is the name of the library to link against (as opposed to the
5722# name of the library into which to insert object files). BLDLIBRARY is also
5723# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5724# is blank as the main program is not linked directly against LDLIBRARY.
5725# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5726# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5727# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5728# DLLLIBRARY is the shared (i.e., DLL) library.
5729#
5730# RUNSHARED is used to run shared python without installed libraries
5731#
5732# INSTSONAME is the name of the shared library that will be use to install
5733# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005734#
5735# LDVERSION is the shared library version number, normally the Python version
5736# with the ABI build flags appended.
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740
5741
5742
5743
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745LDLIBRARY="$LIBRARY"
5746BLDLIBRARY='$(LDLIBRARY)'
5747INSTSONAME='$(LDLIBRARY)'
5748DLLLIBRARY=''
5749LDLIBRARYDIR=''
5750RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LINKCC is the command that links the python executable -- default is $(CC).
5754# If CXX is set, and if it is needed to link a main function that was
5755# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5756# python might then depend on the C++ runtime
5757# This is altered for AIX in order to build the export list before
5758# linking.
5759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5761$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LINKCC"
5763then
5764 LINKCC='$(PURIFY) $(MAINCC)'
5765 case $ac_sys_system in
5766 AIX*)
5767 exp_extra="\"\""
5768 if test $ac_sys_release -ge 5 -o \
5769 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5770 exp_extra="."
5771 fi
5772 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 QNX*)
5774 # qcc must be used because the other compilers do not
5775 # support -N.
5776 LINKCC=qcc;;
5777 esac
5778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5780$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5783# make sure we default having it set to "no": this is used by
5784# distutils.unixccompiler to know if it should add --enable-new-dtags
5785# to linker command lines, and failing to detect GNU ld simply results
5786# in the same bahaviour as before.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5789$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790ac_prog=ld
5791if test "$GCC" = yes; then
5792 ac_prog=`$CC -print-prog-name=ld`
5793fi
5794case `"$ac_prog" -V 2>&1 < /dev/null` in
5795 *GNU*)
5796 GNULD=yes;;
5797 *)
5798 GNULD=no;;
5799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5801$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5804$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005805if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005806 $as_echo_n "(cached) " >&6
5807else
5808 ac_cv_c_inline=no
5809for ac_kw in inline __inline__ __inline; do
5810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5811/* end confdefs.h. */
5812#ifndef __cplusplus
5813typedef int foo_t;
5814static $ac_kw foo_t static_foo () {return 0; }
5815$ac_kw foo_t foo () {return 0; }
5816#endif
5817
5818_ACEOF
5819if ac_fn_c_try_compile "$LINENO"; then :
5820 ac_cv_c_inline=$ac_kw
5821fi
5822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823 test "$ac_cv_c_inline" != no && break
5824done
5825
5826fi
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5828$as_echo "$ac_cv_c_inline" >&6; }
5829
5830case $ac_cv_c_inline in
5831 inline | yes) ;;
5832 *)
5833 case $ac_cv_c_inline in
5834 no) ac_val=;;
5835 *) ac_val=$ac_cv_c_inline;;
5836 esac
5837 cat >>confdefs.h <<_ACEOF
5838#ifndef __cplusplus
5839#define inline $ac_val
5840#endif
5841_ACEOF
5842 ;;
5843esac
5844
5845if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005846
5847$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005848
5849
5850fi
5851
5852
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5854$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005856if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 enableval=$enable_shared;
5858fi
5859
5860
5861if test -z "$enable_shared"
5862then
5863 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005864 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 enable_shared="yes";;
5866 *)
5867 enable_shared="no";;
5868 esac
5869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5871$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5874$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005876if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877 enableval=$enable_profiling;
5878fi
5879
5880if test "x$enable_profiling" = xyes; then
5881 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005882 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884/* end confdefs.h. */
5885int main() { return 0; }
5886_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887if ac_fn_c_try_link "$LINENO"; then :
5888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005892rm -f core conftest.err conftest.$ac_objext \
5893 conftest$ac_exeext conftest.$ac_ext
5894 CC="$ac_save_cc"
5895else
5896 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5899$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
doko@ubuntu.comba015832012-06-30 16:52:05 +02005901if test "x$enable_profiling" = xyes; then
5902 BASECFLAGS="-pg $BASECFLAGS"
5903 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904fi
5905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5907$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5910# library that we build, but we do not want to link against it (we
5911# will find it with a -framework option). For this reason there is an
5912# extra variable BLDLIBRARY against which Python and the extension
5913# modules are linked, BLDLIBRARY. This is normally the same as
5914# LDLIBRARY, but empty for MacOSX framework builds.
5915if test "$enable_framework"
5916then
5917 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 BLDLIBRARY=''
5920else
5921 BLDLIBRARY='$(LDLIBRARY)'
5922fi
5923
5924# Other platforms follow
5925if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005926 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
Matthias Kloseb9621712010-04-24 17:59:49 +00005928$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929
5930 case $ac_sys_system in
5931 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).dll.a'
5933 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
5937 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005940 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005941 then
5942 PY3LIBRARY=libpython3.so
5943 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005945 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005950 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005951 then
5952 PY3LIBRARY=libpython3.so
5953 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 hp*|HP*)
5956 case `uname -m` in
5957 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
5960 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).dylib'
5969 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005970 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005972 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005975 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977 esac
5978else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005979 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 case $ac_sys_system in
5981 CYGWIN*)
5982 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ;;
5985 esac
5986fi
5987
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005988if test "$cross_compiling" = yes; then
5989 RUNSHARED=
5990fi
5991
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5993$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995if test -n "$ac_tool_prefix"; then
5996 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5997set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5999$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006000if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002else
6003 if test -n "$RANLIB"; then
6004 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6005else
6006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH
6008do
6009 IFS=$as_save_IFS
6010 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 break 2
6016 fi
6017done
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019IFS=$as_save_IFS
6020
6021fi
6022fi
6023RANLIB=$ac_cv_prog_RANLIB
6024if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6026$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027else
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6029$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030fi
6031
6032
6033fi
6034if test -z "$ac_cv_prog_RANLIB"; then
6035 ac_ct_RANLIB=$RANLIB
6036 # Extract the first word of "ranlib", so it can be a program name with args.
6037set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6039$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006040if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042else
6043 if test -n "$ac_ct_RANLIB"; then
6044 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6045else
6046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047for as_dir in $PATH
6048do
6049 IFS=$as_save_IFS
6050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055 break 2
6056 fi
6057done
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059IFS=$as_save_IFS
6060
6061fi
6062fi
6063ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6064if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6066$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6069$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070fi
6071
6072 if test "x$ac_ct_RANLIB" = x; then
6073 RANLIB=":"
6074 else
6075 case $cross_compiling:$ac_tool_warned in
6076yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079ac_tool_warned=yes ;;
6080esac
6081 RANLIB=$ac_ct_RANLIB
6082 fi
6083else
6084 RANLIB="$ac_cv_prog_RANLIB"
6085fi
6086
6087
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006088if test -n "$ac_tool_prefix"; then
6089 for ac_prog in ar aal
6090 do
6091 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006095if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097else
6098 if test -n "$AR"; then
6099 ac_cv_prog_AR="$AR" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006108 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110 break 2
6111 fi
6112done
Matthias Kloseb9621712010-04-24 17:59:49 +00006113 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114IFS=$as_save_IFS
6115
6116fi
6117fi
6118AR=$ac_cv_prog_AR
6119if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6121$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122else
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125fi
6126
6127
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006128 test -n "$AR" && break
6129 done
6130fi
6131if test -z "$AR"; then
6132 ac_ct_AR=$AR
6133 for ac_prog in ar aal
6134do
6135 # Extract the first word of "$ac_prog", so it can be a program name with args.
6136set dummy $ac_prog; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_prog_ac_ct_AR+:} false; then :
6140 $as_echo_n "(cached) " >&6
6141else
6142 if test -n "$ac_ct_AR"; then
6143 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6144else
6145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6146for as_dir in $PATH
6147do
6148 IFS=$as_save_IFS
6149 test -z "$as_dir" && as_dir=.
6150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006152 ac_cv_prog_ac_ct_AR="$ac_prog"
6153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6154 break 2
6155 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006157 done
6158IFS=$as_save_IFS
6159
6160fi
6161fi
6162ac_ct_AR=$ac_cv_prog_ac_ct_AR
6163if test -n "$ac_ct_AR"; then
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6165$as_echo "$ac_ct_AR" >&6; }
6166else
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6168$as_echo "no" >&6; }
6169fi
6170
6171
6172 test -n "$ac_ct_AR" && break
6173done
6174
6175 if test "x$ac_ct_AR" = x; then
6176 AR="ar"
6177 else
6178 case $cross_compiling:$ac_tool_warned in
6179yes:)
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6182ac_tool_warned=yes ;;
6183esac
6184 AR=$ac_ct_AR
6185 fi
6186fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187
6188
6189# tweak ARFLAGS only if the user didn't set it on the command line
6190
6191if test -z "$ARFLAGS"
6192then
6193 ARFLAGS="rc"
6194fi
6195
doko@ubuntu.com58844492012-06-30 18:25:32 +02006196if test -n "$ac_tool_prefix"; then
6197 for ac_prog in readelf
6198 do
6199 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6200set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_prog_READELF+:} false; then :
6204 $as_echo_n "(cached) " >&6
6205else
6206 if test -n "$READELF"; then
6207 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
6214 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006216 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218 break 2
6219 fi
6220done
6221 done
6222IFS=$as_save_IFS
6223
6224fi
6225fi
6226READELF=$ac_cv_prog_READELF
6227if test -n "$READELF"; then
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6229$as_echo "$READELF" >&6; }
6230else
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236 test -n "$READELF" && break
6237 done
6238fi
6239if test -z "$READELF"; then
6240 ac_ct_READELF=$READELF
6241 for ac_prog in readelf
6242do
6243 # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6248 $as_echo_n "(cached) " >&6
6249else
6250 if test -n "$ac_ct_READELF"; then
6251 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6252else
6253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH
6255do
6256 IFS=$as_save_IFS
6257 test -z "$as_dir" && as_dir=.
6258 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006259 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006260 ac_cv_prog_ac_ct_READELF="$ac_prog"
6261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6262 break 2
6263 fi
6264done
6265 done
6266IFS=$as_save_IFS
6267
6268fi
6269fi
6270ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6271if test -n "$ac_ct_READELF"; then
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6273$as_echo "$ac_ct_READELF" >&6; }
6274else
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276$as_echo "no" >&6; }
6277fi
6278
6279
6280 test -n "$ac_ct_READELF" && break
6281done
6282
6283 if test "x$ac_ct_READELF" = x; then
6284 READELF=":"
6285 else
6286 case $cross_compiling:$ac_tool_warned in
6287yes:)
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6290ac_tool_warned=yes ;;
6291esac
6292 READELF=$ac_ct_READELF
6293 fi
6294fi
6295
6296if test "$cross_compiling" = yes; then
6297 case "$READELF" in
6298 readelf|:)
6299 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6300 ;;
6301 esac
6302fi
6303
6304
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
Matthias Klosec4c48422012-10-21 23:05:35 +02006306for ac_prog in python$PACKAGE_VERSION python3 python
6307do
6308 # Extract the first word of "$ac_prog", so it can be a program name with args.
6309set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006312if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006313 $as_echo_n "(cached) " >&6
6314else
Matthias Klosec4c48422012-10-21 23:05:35 +02006315 if test -n "$PYTHON"; then
6316 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006317else
6318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319for as_dir in $PATH
6320do
6321 IFS=$as_save_IFS
6322 test -z "$as_dir" && as_dir=.
6323 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006325 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6327 break 2
6328 fi
6329done
6330 done
6331IFS=$as_save_IFS
6332
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006333fi
6334fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006335PYTHON=$ac_cv_prog_PYTHON
6336if test -n "$PYTHON"; then
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6338$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006339else
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
6342fi
6343
6344
Matthias Klosec4c48422012-10-21 23:05:35 +02006345 test -n "$PYTHON" && break
6346done
6347test -n "$PYTHON" || PYTHON="not-found"
6348
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006349if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006350 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6351else
6352 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006353fi
6354
6355
Kushal Das02d23a22014-04-15 23:50:06 +05306356for ac_prog in python$PACKAGE_VERSION python3 python
6357do
6358 # Extract the first word of "$ac_prog", so it can be a program name with args.
6359set dummy $ac_prog; ac_word=$2
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361$as_echo_n "checking for $ac_word... " >&6; }
6362if ${ac_cv_prog_PYTHON+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364else
6365 if test -n "$PYTHON"; then
6366 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6367else
6368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH
6370do
6371 IFS=$as_save_IFS
6372 test -z "$as_dir" && as_dir=.
6373 for ac_exec_ext in '' $ac_executable_extensions; do
6374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375 ac_cv_prog_PYTHON="$ac_prog"
6376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377 break 2
6378 fi
6379done
6380 done
6381IFS=$as_save_IFS
6382
6383fi
6384fi
6385PYTHON=$ac_cv_prog_PYTHON
6386if test -n "$PYTHON"; then
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6388$as_echo "$PYTHON" >&6; }
6389else
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395 test -n "$PYTHON" && break
6396done
6397test -n "$PYTHON" || PYTHON="not-found"
6398
6399if test "$PYTHON" = not-found; then
6400 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6401else
6402 OPCODEHGEN="$PYTHON"
6403fi
6404
6405
6406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407case $MACHDEP in
6408bsdos*|hp*|HP*)
6409 # install -d does not work on BSDI or HP-UX
6410 if test -z "$INSTALL"
6411 then
6412 INSTALL="${srcdir}/install-sh -c"
6413 fi
6414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415# Find a good install program. We prefer a C program (faster),
6416# so one script is as good as another. But avoid the broken or
6417# incompatible versions:
6418# SysV /etc/install, /usr/sbin/install
6419# SunOS /usr/etc/install
6420# IRIX /sbin/install
6421# AIX /bin/install
6422# AmigaOS /C/install, which installs bootblocks on floppy discs
6423# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6424# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6425# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6426# OS/2's system install, which has a completely different semantic
6427# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006428# Reject install programs that cannot install multiple files.
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6430$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006432if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006433 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434else
6435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438 IFS=$as_save_IFS
6439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006440 # Account for people who put trailing slashes in PATH elements.
6441case $as_dir/ in #((
6442 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 /usr/ucb/* ) ;;
6446 *)
6447 # OSF1 and SCO ODT 3.0 have their own names for install.
6448 # Don't use installbsd from OSF since it installs stuff as root
6449 # by default.
6450 for ac_prog in ginstall scoinst install; do
6451 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006452 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 if test $ac_prog = install &&
6454 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6455 # AIX install. It has an incompatible calling convention.
6456 :
6457 elif test $ac_prog = install &&
6458 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6459 # program-specific install script used by HP pwplus--don't use.
6460 :
6461 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006462 rm -rf conftest.one conftest.two conftest.dir
6463 echo one > conftest.one
6464 echo two > conftest.two
6465 mkdir conftest.dir
6466 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6467 test -s conftest.one && test -s conftest.two &&
6468 test -s conftest.dir/conftest.one &&
6469 test -s conftest.dir/conftest.two
6470 then
6471 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6472 break 3
6473 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006474 fi
6475 fi
6476 done
6477 done
6478 ;;
6479esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006480
6481 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482IFS=$as_save_IFS
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
6486fi
6487 if test "${ac_cv_path_install+set}" = set; then
6488 INSTALL=$ac_cv_path_install
6489 else
6490 # As a last resort, use the slow shell script. Don't cache a
6491 # value for INSTALL within a source directory, because that will
6492 # break other packages using the cache if that directory is
6493 # removed, or if the value is a relative name.
6494 INSTALL=$ac_install_sh
6495 fi
6496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6498$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499
6500# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6501# It thinks the first close brace ends the variable substitution.
6502test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6503
6504test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6505
6506test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6507
Matthias Klose93a0ef12012-03-15 18:08:34 +01006508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6509$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6510if test -z "$MKDIR_P"; then
6511 if ${ac_cv_path_mkdir+:} false; then :
6512 $as_echo_n "(cached) " >&6
6513else
6514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6516do
6517 IFS=$as_save_IFS
6518 test -z "$as_dir" && as_dir=.
6519 for ac_prog in mkdir gmkdir; do
6520 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006521 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006522 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6523 'mkdir (GNU coreutils) '* | \
6524 'mkdir (coreutils) '* | \
6525 'mkdir (fileutils) '4.1*)
6526 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6527 break 3;;
6528 esac
6529 done
6530 done
6531 done
6532IFS=$as_save_IFS
6533
6534fi
6535
6536 test -d ./--version && rmdir ./--version
6537 if test "${ac_cv_path_mkdir+set}" = set; then
6538 MKDIR_P="$ac_cv_path_mkdir -p"
6539 else
6540 # As a last resort, use the slow shell script. Don't cache a
6541 # value for MKDIR_P within a source directory, because that will
6542 # break other packages using the cache if that directory is
6543 # removed, or if the value is a relative name.
6544 MKDIR_P="$ac_install_sh -d"
6545 fi
6546fi
6547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6548$as_echo "$MKDIR_P" >&6; }
6549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550
6551# Not every filesystem supports hard links
6552
6553if test -z "$LN" ; then
6554 case $ac_sys_system in
6555 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556 *) LN=ln;;
6557 esac
6558fi
6559
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006560# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006561
6562ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006563
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6566$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006567
6568# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006569if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 withval=$with_pydebug;
6571if test "$withval" != no
6572then
6573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6577$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006579 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006580else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582fi
6583else
Matthias Kloseb9621712010-04-24 17:59:49 +00006584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586fi
6587
6588
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006589# Enable LTO flags
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6592$as_echo_n "checking for --with-lto... " >&6; }
6593
6594# Check whether --with-lto was given.
6595if test "${with_lto+set}" = set; then :
6596 withval=$with_lto;
6597if test "$withval" != no
6598then
6599 Py_LTO='true'
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6601$as_echo "yes" >&6; };
6602else
6603 Py_LTO='false'
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; };
6606fi
6607else
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
6610fi
6611
6612if test "$Py_LTO" = 'true' ; then
6613 case $CC in
6614 *clang*)
6615 # Any changes made here should be reflected in the GCC+Darwin case below
6616 LTOFLAGS="-flto"
6617 ;;
6618 *gcc*)
6619 case $ac_sys_system in
6620 Darwin*)
6621 LTOFLAGS="-flto"
6622 ;;
6623 *)
6624 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6625 ;;
6626 esac
6627 ;;
6628 esac
6629fi
6630
Brett Cannon7188a3e2015-09-18 15:13:44 -07006631# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006632
6633
6634
6635
6636
6637
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638# Extract the first word of "llvm-profdata", so it can be a program name with args.
6639set dummy llvm-profdata; ac_word=$2
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641$as_echo_n "checking for $ac_word... " >&6; }
6642if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6643 $as_echo_n "(cached) " >&6
6644else
6645 if test -n "$LLVM_PROF_FOUND"; then
6646 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6647else
6648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6649for as_dir in $PATH
6650do
6651 IFS=$as_save_IFS
6652 test -z "$as_dir" && as_dir=.
6653 for ac_exec_ext in '' $ac_executable_extensions; do
6654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6655 ac_cv_prog_LLVM_PROF_FOUND="found"
6656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6657 break 2
6658 fi
6659done
6660 done
6661IFS=$as_save_IFS
6662
6663 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6664fi
6665fi
6666LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6667if test -n "$LLVM_PROF_FOUND"; then
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6669$as_echo "$LLVM_PROF_FOUND" >&6; }
6670else
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6672$as_echo "no" >&6; }
6673fi
6674
6675
6676LLVM_PROF_ERR=no
6677case $CC in
6678 *clang*)
6679 # Any changes made here should be reflected in the GCC+Darwin case below
6680 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6681 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6682 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6683 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6684 if test $LLVM_PROF_FOUND = not-found
6685 then
6686 LLVM_PROF_ERR=yes
6687 fi
6688 ;;
6689 *gcc*)
6690 case $ac_sys_system in
6691 Darwin*)
6692 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6693 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6694 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6695 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6696 if test $LLVM_PROF_FOUND = not-found
6697 then
6698 LLVM_PROF_ERR=yes
6699 fi
6700 ;;
6701 *)
6702 PGO_PROF_GEN_FLAG="-fprofile-generate"
6703 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6704 LLVM_PROF_MERGER="true"
6705 LLVM_PROF_FILE=""
6706 ;;
6707 esac
6708 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006709 *icc*)
6710 PGO_PROF_GEN_FLAG="-prof-gen"
6711 PGO_PROF_USE_FLAG="-prof-use"
6712 LLVM_PROF_MERGER="true"
6713 LLVM_PROF_FILE=""
6714 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006715esac
6716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6718# merged with this chunk of code?
6719
6720# Optimizer/debugger flags
6721# ------------------------
6722# (The following bit of code is complicated enough - please keep things
6723# indented properly. Just pretend you're editing Python code. ;-)
6724
6725# There are two parallel sets of case statements below, one that checks to
6726# see if OPT was set and one that does BASECFLAGS setting based upon
6727# compiler and platform. BASECFLAGS tweaks need to be made even if the
6728# user set OPT.
6729
6730# tweak OPT based on compiler and platform, only if the user didn't set
6731# it on the command line
6732
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006733if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734then
6735 case $GCC in
6736 yes)
6737 if test "$CC" != 'g++' ; then
6738 STRICT_PROTO="-Wstrict-prototypes"
6739 fi
6740 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6741 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6742 WRAP="-fwrapv"
6743 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006744
6745 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006746 case $CC in
6747 *clang*) WRAP="-fwrapv"
6748 ;;
6749 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 case $ac_cv_prog_cc_g in
6752 yes)
6753 if test "$Py_DEBUG" = 'true' ; then
6754 # Optimization messes up debuggers, so turn it off for
6755 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006756 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6757 OPT="-g -Og -Wall $STRICT_PROTO"
6758 else
6759 OPT="-g -O0 -Wall $STRICT_PROTO"
6760 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761 else
6762 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6763 fi
6764 ;;
6765 *)
6766 OPT="-O3 -Wall $STRICT_PROTO"
6767 ;;
6768 esac
6769 case $ac_sys_system in
6770 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6771 ;;
6772 esac
6773 ;;
6774
6775 *)
6776 OPT="-O"
6777 ;;
6778 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779fi
6780
6781
6782
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784# The -arch flags for universal builds on OSX
6785UNIVERSAL_ARCH_FLAGS=
6786
6787
6788# tweak BASECFLAGS based on compiler and platform
6789case $GCC in
6790yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006791 # Python doesn't violate C99 aliasing rules, but older versions of
6792 # GCC produce warnings for legal Python code. Enable
6793 # -fno-strict-aliasing on versions of GCC that support but produce
6794 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6796$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797 ac_save_cc="$CC"
6798 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006799 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006800 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006805
Matthias Kloseb159a552010-04-25 21:00:44 +00006806
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006807int
6808main ()
6809{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006810
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006811 ;
6812 return 0;
6813}
Matthias Kloseb159a552010-04-25 21:00:44 +00006814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006816if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006817
6818 CC="$ac_save_cc -fstrict-aliasing"
6819 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821/* end confdefs.h. */
6822
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006823 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824int
6825main ()
6826{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006827double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006828 ;
6829 return 0;
6830}
Matthias Kloseb159a552010-04-25 21:00:44 +00006831
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006833if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006834
6835 ac_cv_no_strict_aliasing=no
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837else
Matthias Kloseb159a552010-04-25 21:00:44 +00006838
6839 ac_cv_no_strict_aliasing=yes
6840
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006841fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006843
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844else
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
6846 ac_cv_no_strict_aliasing=no
6847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006850fi
6851
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6855$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 then
6858 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6859 fi
6860
Zachary Ware5af85642015-12-21 12:09:17 -06006861 # ICC doesn't recognize the option, but only emits a warning
6862 ## XXX does it emit an unused result warning and can it be disabled?
6863 case "$CC" in
6864 *icc*)
6865 ac_cv_disable_unused_result_warning=no
6866 ;;
6867 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6869$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6870 ac_save_cc="$CC"
6871 CC="$CC -Wunused-result -Werror"
6872 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006873 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006874 $as_echo_n "(cached) " >&6
6875else
6876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877/* end confdefs.h. */
6878
6879
6880int
6881main ()
6882{
6883
6884 ;
6885 return 0;
6886}
6887
6888_ACEOF
6889if ac_fn_c_try_compile "$LINENO"; then :
6890
6891 ac_cv_disable_unused_result_warning=yes
6892
6893else
6894
6895 ac_cv_disable_unused_result_warning=no
6896
6897fi
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6899fi
6900
6901 CFLAGS="$save_CFLAGS"
6902 CC="$ac_save_cc"
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6904$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006905 ;;
6906 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006907
6908 if test $ac_cv_disable_unused_result_warning = yes
6909 then
6910 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6911 fi
6912
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6914$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6915 ac_save_cc="$CC"
6916 CC="$CC -Werror=declaration-after-statement"
6917 save_CFLAGS="$CFLAGS"
6918 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6919 $as_echo_n "(cached) " >&6
6920else
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922/* end confdefs.h. */
6923
6924
6925int
6926main ()
6927{
6928
6929 ;
6930 return 0;
6931}
6932
6933_ACEOF
6934if ac_fn_c_try_compile "$LINENO"; then :
6935
6936 ac_cv_declaration_after_statement_warning=yes
6937
6938else
6939
6940 ac_cv_declaration_after_statement_warning=no
6941
6942fi
6943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944fi
6945
6946 CFLAGS="$save_CFLAGS"
6947 CC="$ac_save_cc"
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6949$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6950
6951 if test $ac_cv_declaration_after_statement_warning = yes
6952 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006953 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006954 fi
6955
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6957$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6958 ac_save_cc="$CC"
6959 CC="$CC -Wsign-compare"
6960 save_CFLAGS="$CFLAGS"
6961 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963else
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6965/* end confdefs.h. */
6966
6967
6968int
6969main ()
6970{
6971
6972 ;
6973 return 0;
6974}
6975
6976_ACEOF
6977if ac_fn_c_try_compile "$LINENO"; then :
6978
6979 ac_cv_enable_sign_compare_warning=yes
6980
6981else
6982
6983 ac_cv_enable_sign_compare_warning=no
6984
6985fi
6986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6987fi
6988
6989 CFLAGS="$save_CFLAGS"
6990 CC="$ac_save_cc"
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6992$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6993
6994 if test $ac_cv_enable_sign_compare_warning = yes
6995 then
6996 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6997 fi
6998
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7000$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7001 ac_save_cc="$CC"
7002 CC="$CC -Wunreachable-code"
7003 save_CFLAGS="$CFLAGS"
7004 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7005 $as_echo_n "(cached) " >&6
7006else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008/* end confdefs.h. */
7009
7010
7011int
7012main ()
7013{
7014
7015 ;
7016 return 0;
7017}
7018
7019_ACEOF
7020if ac_fn_c_try_compile "$LINENO"; then :
7021
7022 ac_cv_enable_unreachable_code_warning=yes
7023
7024else
7025
7026 ac_cv_enable_unreachable_code_warning=no
7027
7028fi
7029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7030fi
7031
7032 CFLAGS="$save_CFLAGS"
7033 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007034
7035 # Don't enable unreachable code warning in debug mode, since it usually
7036 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007037 # Issue #24324: Unfortunately, the unreachable code warning does not work
7038 # correctly on gcc and has been silently removed from the compiler.
7039 # It is supported on clang but on OS X systems gcc may be an alias
7040 # for clang. Try to determine if the compiler is not really gcc and,
7041 # if so, only then enable the warning.
7042 if test $ac_cv_enable_unreachable_code_warning = yes && \
7043 test "$Py_DEBUG" != "true" && \
7044 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007045 then
7046 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007047 else
7048 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007049 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7051$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007052
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7054 # support. Without this, treatment of subnormals doesn't follow
7055 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007056 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057 alpha*)
7058 BASECFLAGS="$BASECFLAGS -mieee"
7059 ;;
7060 esac
7061
7062 case $ac_sys_system in
7063 SCO_SV*)
7064 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7065 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007066
7067 # is there any other compiler on Darwin besides gcc?
7068 Darwin*)
7069 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7070 # used to be here, but non-Apple gcc doesn't accept them.
7071 if test "${CC}" = gcc
7072 then
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007074$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007075 case "${UNIVERSALSDK}" in
7076 */MacOSX10.4u.sdk)
7077 # Build using 10.4 SDK, force usage of gcc when the
7078 # compiler is gcc, otherwise the user will get very
7079 # confusing error messages when building on OSX 10.6
7080 CC=gcc-4.0
7081 CPP=cpp-4.0
7082 ;;
7083 esac
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007085$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007086 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007087
Ned Deily87adb6e2013-10-18 21:09:56 -07007088 if test "${enable_universalsdk}"
7089 then
7090 case "$UNIVERSAL_ARCHS" in
7091 32-bit)
7092 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7093 LIPO_32BIT_FLAGS=""
7094 ARCH_RUN_32BIT=""
7095 ;;
7096 64-bit)
7097 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7098 LIPO_32BIT_FLAGS=""
7099 ARCH_RUN_32BIT="true"
7100 ;;
7101 all)
7102 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7103 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7104 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7105 ;;
7106 intel)
7107 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7108 LIPO_32BIT_FLAGS="-extract i386"
7109 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7110 ;;
7111 intel-32)
7112 UNIVERSAL_ARCH_FLAGS="-arch i386"
7113 LIPO_32BIT_FLAGS=""
7114 ARCH_RUN_32BIT=""
7115 ;;
7116 3-way)
7117 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7118 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7119 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7120 ;;
7121 *)
7122 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7123 ;;
7124 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125
Ned Deily87adb6e2013-10-18 21:09:56 -07007126 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7127 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7128 if test "${UNIVERSALSDK}" != "/"
7129 then
7130 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7131 fi
7132 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133
Ned Deily87adb6e2013-10-18 21:09:56 -07007134 # Calculate an appropriate deployment target for this build:
7135 # The deployment target value is used explicitly to enable certain
7136 # features are enabled (such as builtin libedit support for readline)
7137 # through the use of Apple's Availabiliy Macros and is used as a
7138 # component of the string returned by distutils.get_platform().
7139 #
7140 # Use the value from:
7141 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7142 # 2. the operating system version of the build machine if >= 10.6
7143 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7144 # below to pick either 10.3, 10.4, or 10.5 as the target.
7145 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146
Ned Deily87adb6e2013-10-18 21:09:56 -07007147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7148$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007149 cur_target_major=`sw_vers -productVersion | \
7150 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7151 cur_target_minor=`sw_vers -productVersion | \
7152 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7153 cur_target="${cur_target_major}.${cur_target_minor}"
7154 if test ${cur_target_major} -eq 10 && \
7155 test ${cur_target_minor} -ge 3 && \
7156 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007157 then
Ned Deily36820b62014-06-25 13:44:22 -07007158 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007159 cur_target=10.3
7160 if test ${enable_universalsdk}
7161 then
7162 case "$UNIVERSAL_ARCHS" in
7163 all|3-way|intel|64-bit)
7164 # These configurations were first supported in 10.5
7165 cur_target='10.5'
7166 ;;
7167 esac
7168 else
7169 if test `/usr/bin/arch` = "i386"
7170 then
7171 # 10.4 was the first release to support Intel archs
7172 cur_target="10.4"
7173 fi
7174 fi
7175 fi
7176 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007177
Ned Deily87adb6e2013-10-18 21:09:56 -07007178 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7179 # environment with a value that is the same as what we'll use
7180 # in the Makefile to ensure that we'll get the same compiler
7181 # environment during configure and build time.
7182 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7183 export MACOSX_DEPLOYMENT_TARGET
7184 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7186$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007187
Ned Deily87adb6e2013-10-18 21:09:56 -07007188 # end of Darwin* tests
7189 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 esac
7191 ;;
7192
7193*)
7194 case $ac_sys_system in
7195 OpenUNIX*|UnixWare*)
7196 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7197 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198 SCO_SV*)
7199 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7200 ;;
7201 esac
7202 ;;
7203esac
7204
Zachary Ware5af85642015-12-21 12:09:17 -06007205# ICC needs -fp-model strict or floats behave badly
7206case "$CC" in
7207*icc*)
7208 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7209 ;;
7210esac
7211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212if test "$Py_DEBUG" = 'true'; then
7213 :
7214else
7215 OPT="-DNDEBUG $OPT"
7216fi
7217
7218if test "$ac_arch_flags"
7219then
7220 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7221fi
7222
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223# On some compilers, pthreads are available without further options
7224# (e.g. MacOS X). On some of these systems, the compiler will not
7225# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7226# So we have to see first whether pthreads are available without
7227# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7229$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234 ac_cv_pthread_is_default=no
7235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237/* end confdefs.h. */
7238
Stefan Krah7dba5942012-11-22 22:49:11 +01007239#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240#include <pthread.h>
7241
7242void* routine(void* p){return NULL;}
7243
7244int main(){
7245 pthread_t p;
7246 if(pthread_create(&p,NULL,routine,NULL)!=0)
7247 return 1;
7248 (void)pthread_detach(p);
7249 return 0;
7250}
7251
7252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007253if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254
7255 ac_cv_pthread_is_default=yes
7256 ac_cv_kthread=no
7257 ac_cv_pthread=no
7258
7259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264fi
7265
7266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267fi
7268
Matthias Kloseb9621712010-04-24 17:59:49 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7270$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271
7272
7273if test $ac_cv_pthread_is_default = yes
7274then
7275 ac_cv_kpthread=no
7276else
7277# -Kpthread, if available, provides the right #defines
7278# and linker options to make pthread_create available
7279# Some compilers won't report that they do not support -Kpthread,
7280# so we need to run a program to see whether it really made the
7281# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7283$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007284if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286else
7287 ac_save_cc="$CC"
7288CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 ac_cv_kpthread=no
7291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293/* end confdefs.h. */
7294
Stefan Krah7dba5942012-11-22 22:49:11 +01007295#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296#include <pthread.h>
7297
7298void* routine(void* p){return NULL;}
7299
7300int main(){
7301 pthread_t p;
7302 if(pthread_create(&p,NULL,routine,NULL)!=0)
7303 return 1;
7304 (void)pthread_detach(p);
7305 return 0;
7306}
7307
7308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007309if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310 ac_cv_kpthread=yes
7311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316fi
7317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318CC="$ac_save_cc"
7319fi
7320
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7322$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323fi
7324
7325if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7326then
7327# -Kthread, if available, provides the right #defines
7328# and linker options to make pthread_create available
7329# Some compilers won't report that they do not support -Kthread,
7330# so we need to run a program to see whether it really made the
7331# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7333$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007334if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336else
7337 ac_save_cc="$CC"
7338CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340 ac_cv_kthread=no
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343/* end confdefs.h. */
7344
Stefan Krah7dba5942012-11-22 22:49:11 +01007345#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346#include <pthread.h>
7347
7348void* routine(void* p){return NULL;}
7349
7350int main(){
7351 pthread_t p;
7352 if(pthread_create(&p,NULL,routine,NULL)!=0)
7353 return 1;
7354 (void)pthread_detach(p);
7355 return 0;
7356}
7357
7358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007359if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 ac_cv_kthread=yes
7361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366fi
7367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368CC="$ac_save_cc"
7369fi
7370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7372$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373fi
7374
7375if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7376then
7377# -pthread, if available, provides the right #defines
7378# and linker options to make pthread_create available
7379# Some compilers won't report that they do not support -pthread,
7380# so we need to run a program to see whether it really made the
7381# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7383$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007384if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386else
7387 ac_save_cc="$CC"
7388CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 ac_cv_pthread=no
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393/* end confdefs.h. */
7394
Stefan Krah7dba5942012-11-22 22:49:11 +01007395#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396#include <pthread.h>
7397
7398void* routine(void* p){return NULL;}
7399
7400int main(){
7401 pthread_t p;
7402 if(pthread_create(&p,NULL,routine,NULL)!=0)
7403 return 1;
7404 (void)pthread_detach(p);
7405 return 0;
7406}
7407
7408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007409if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 ac_cv_pthread=yes
7411else
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416fi
7417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418CC="$ac_save_cc"
7419fi
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7422$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423fi
7424
7425# If we have set a CC compiler flag for thread support then
7426# check if it works for CXX, too.
7427ac_cv_cxx_thread=no
7428if test ! -z "$CXX"
7429then
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7431$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432ac_save_cxx="$CXX"
7433
7434if test "$ac_cv_kpthread" = "yes"
7435then
7436 CXX="$CXX -Kpthread"
7437 ac_cv_cxx_thread=yes
7438elif test "$ac_cv_kthread" = "yes"
7439then
7440 CXX="$CXX -Kthread"
7441 ac_cv_cxx_thread=yes
7442elif test "$ac_cv_pthread" = "yes"
7443then
7444 CXX="$CXX -pthread"
7445 ac_cv_cxx_thread=yes
7446fi
7447
7448if test $ac_cv_cxx_thread = yes
7449then
7450 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7451 $CXX -c conftest.$ac_ext 2>&5
7452 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7453 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7454 then
7455 ac_cv_cxx_thread=yes
7456 else
7457 ac_cv_cxx_thread=no
7458 fi
7459 rm -fr conftest*
7460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7462$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463fi
7464CXX="$ac_save_cxx"
7465
7466
7467# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7469$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007470if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474/* end confdefs.h. */
7475#include <stdlib.h>
7476#include <stdarg.h>
7477#include <string.h>
7478#include <float.h>
7479
7480int
7481main ()
7482{
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007488if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489 ac_cv_header_stdc=yes
7490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7494
7495if test $ac_cv_header_stdc = yes; then
7496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498/* end confdefs.h. */
7499#include <string.h>
7500
7501_ACEOF
7502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 $EGREP "memchr" >/dev/null 2>&1; then :
7504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505else
7506 ac_cv_header_stdc=no
7507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007508rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
7510fi
7511
7512if test $ac_cv_header_stdc = yes; then
7513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515/* end confdefs.h. */
7516#include <stdlib.h>
7517
7518_ACEOF
7519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 $EGREP "free" >/dev/null 2>&1; then :
7521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522else
7523 ac_cv_header_stdc=no
7524fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007525rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526
7527fi
7528
7529if test $ac_cv_header_stdc = yes; then
7530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 :
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536#include <ctype.h>
7537#include <stdlib.h>
7538#if ((' ' & 0x0FF) == 0x020)
7539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7541#else
7542# define ISLOWER(c) \
7543 (('a' <= (c) && (c) <= 'i') \
7544 || ('j' <= (c) && (c) <= 'r') \
7545 || ('s' <= (c) && (c) <= 'z'))
7546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7547#endif
7548
7549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7550int
7551main ()
7552{
7553 int i;
7554 for (i = 0; i < 256; i++)
7555 if (XOR (islower (i), ISLOWER (i))
7556 || toupper (i) != TOUPPER (i))
7557 return 2;
7558 return 0;
7559}
7560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if ac_fn_c_try_run "$LINENO"; then :
7562
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568fi
7569
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570fi
7571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7573$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574if test $ac_cv_header_stdc = yes; then
7575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577
7578fi
7579
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007580for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007581fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007582ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007583sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007584unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007585poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007586sys/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 +01007587sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007588sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007589sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007590sys/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 -07007591libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007592bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007593sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007594do :
7595 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7596ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007597if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007599#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007600_ACEOF
7601
7602fi
7603
Guido van Rossum627b2d71993-12-24 10:39:16 +00007604done
7605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007607for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7610$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007611if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007616#include <sys/types.h>
7617#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007618
Martin v. Löwis11437992002-04-12 09:54:03 +00007619int
7620main ()
7621{
7622if ((DIR *) 0)
7623return 0;
7624 ;
7625 return 0;
7626}
7627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635eval ac_res=\$$as_ac_Header
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7637$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007638if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007640#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
7642
7643ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646done
7647# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7648if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7650$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007653else
Martin v. Löwis11437992002-04-12 09:54:03 +00007654 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658/* Override any GCC internal prototype to avoid an error.
7659 Use char because int might match the return type of a GCC
7660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007661#ifdef __cplusplus
7662extern "C"
7663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007664char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ;
7670 return 0;
7671}
7672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673for ac_lib in '' dir; do
7674 if test -z "$ac_lib"; then
7675 ac_res="none required"
7676 else
7677 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007678 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683rm -f core conftest.err conftest.$ac_objext \
7684 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007685 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688done
Victor Stinnere0be4232011-10-25 13:06:09 +02007689if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691else
7692 ac_cv_search_opendir=no
7693fi
7694rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007695LIBS=$ac_func_search_save_LIBS
7696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7698$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007700if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007702
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007704
Michael W. Hudson54241132001-12-07 15:38:26 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7707$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007708if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007710else
7711 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715/* Override any GCC internal prototype to avoid an error.
7716 Use char because int might match the return type of a GCC
7717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718#ifdef __cplusplus
7719extern "C"
7720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007721char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
7724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 ;
7727 return 0;
7728}
7729_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730for ac_lib in '' x; do
7731 if test -z "$ac_lib"; then
7732 ac_res="none required"
7733 else
7734 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740rm -f core conftest.err conftest.$ac_objext \
7741 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007742 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745done
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748else
7749 ac_cv_search_opendir=no
7750fi
7751rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752LIBS=$ac_func_search_save_LIBS
7753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7755$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007757if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760fi
7761
7762fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7765$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007770/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007771#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007772int
7773main ()
7774{
7775return makedev(0, 0);
7776 ;
7777 return 0;
7778}
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007781 ac_cv_header_sys_types_h_makedev=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core conftest.err conftest.$ac_objext \
7786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007787
7788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7790$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007791
7792if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793ac_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 +02007794if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007795
Matthias Kloseb9621712010-04-24 17:59:49 +00007796$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007797
7798fi
7799
7800
7801
7802 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 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 +02007804if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007805
Matthias Kloseb9621712010-04-24 17:59:49 +00007806$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007807
7808fi
7809
7810
7811 fi
7812fi
7813
Michael W. Hudson54241132001-12-07 15:38:26 +00007814
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007815# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7816for ac_header in net/if.h
7817do :
7818 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7819#ifdef STDC_HEADERS
7820# include <stdlib.h>
7821# include <stddef.h>
7822#else
7823# ifdef HAVE_STDLIB_H
7824# include <stdlib.h>
7825# endif
7826#endif
7827#ifdef HAVE_SYS_SOCKET_H
7828# include <sys/socket.h>
7829#endif
7830
7831"
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007833 cat >>confdefs.h <<_ACEOF
7834#define HAVE_NET_IF_H 1
7835_ACEOF
7836
7837fi
7838
7839done
7840
7841
Martin v. Löwis11017b12006-01-14 18:12:57 +00007842# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007843for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007844do :
7845 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 +00007846#ifdef HAVE_ASM_TYPES_H
7847#include <asm/types.h>
7848#endif
7849#ifdef HAVE_SYS_SOCKET_H
7850#include <sys/socket.h>
7851#endif
7852
Matthias Kloseb9621712010-04-24 17:59:49 +00007853"
Victor Stinnere0be4232011-10-25 13:06:09 +02007854if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007855 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007856#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007857_ACEOF
7858
7859fi
7860
7861done
7862
7863
Charles-François Natali47413c12011-10-06 19:47:44 +02007864# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007865for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007866do :
7867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7868ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7869#ifdef HAVE_SYS_SOCKET_H
7870#include <sys/socket.h>
7871#endif
7872
7873"
7874if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7875 cat >>confdefs.h <<_ACEOF
7876#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7877_ACEOF
7878
7879fi
7880
7881done
7882
7883
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007885was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7887$as_echo_n "checking for clock_t in time.h... " >&6; }
7888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
7892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007895 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896else
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
7898
Matthias Kloseb9621712010-04-24 17:59:49 +00007899$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007901
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007903rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7906$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7909$as_echo_n "checking for makedev... " >&6; }
7910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
Jesus Cea740f53a2010-04-28 11:35:30 +00007913#if defined(MAJOR_IN_MKDEV)
7914#include <sys/mkdev.h>
7915#elif defined(MAJOR_IN_SYSMACROS)
7916#include <sys/sysmacros.h>
7917#else
7918#include <sys/types.h>
7919#endif
7920
Neal Norwitz11690112002-07-30 01:08:28 +00007921int
7922main ()
7923{
Jesus Cea740f53a2010-04-28 11:35:30 +00007924
7925 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007926 ;
7927 return 0;
7928}
Matthias Kloseb159a552010-04-25 21:00:44 +00007929
Neal Norwitz11690112002-07-30 01:08:28 +00007930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007931if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007932 ac_cv_has_makedev=yes
7933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936rm -f core conftest.err conftest.$ac_objext \
7937 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7939$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007940if test "$ac_cv_has_makedev" = "yes"; then
7941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007943
7944fi
7945
Christian Heimes985ecdc2013-11-20 11:46:18 +01007946# byte swapping
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7948$as_echo_n "checking for le64toh... " >&6; }
7949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7950/* end confdefs.h. */
7951
7952#ifdef HAVE_ENDIAN_H
7953#include <endian.h>
7954#elif defined(HAVE_SYS_ENDIAN_H)
7955#include <sys/endian.h>
7956#endif
7957
7958int
7959main ()
7960{
7961
7962 le64toh(1)
7963 ;
7964 return 0;
7965}
7966
7967_ACEOF
7968if ac_fn_c_try_link "$LINENO"; then :
7969 ac_cv_has_le64toh=yes
7970else
7971 ac_cv_has_le64toh=no
7972fi
7973rm -f core conftest.err conftest.$ac_objext \
7974 conftest$ac_exeext conftest.$ac_ext
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7976$as_echo "$ac_cv_has_le64toh" >&6; }
7977if test "$ac_cv_has_le64toh" = "yes"; then
7978
7979$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7980
7981fi
7982
Martin v. Löwis399a6892002-10-04 10:22:02 +00007983# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7984# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7985# defined, but the compiler does not support pragma redefine_extname,
7986# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7987# structures (such as rlimit64) without declaring them. As a
7988# work-around, disable LFS on such configurations
7989
7990use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7992$as_echo_n "checking Solaris LFS bug... " >&6; }
7993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007995
7996#define _LARGEFILE_SOURCE 1
7997#define _FILE_OFFSET_BITS 64
7998#include <sys/resource.h>
7999
Martin v. Löwis399a6892002-10-04 10:22:02 +00008000int
8001main ()
8002{
8003struct rlimit foo;
8004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008009 sol_lfs_bug=no
8010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8015$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008016if test "$sol_lfs_bug" = "yes"; then
8017 use_lfs=no
8018fi
8019
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008020# Don't use largefile support for GNU/Hurd
8021case $ac_sys_system in GNU*)
8022 use_lfs=no
8023esac
8024
Martin v. Löwis399a6892002-10-04 10:22:02 +00008025if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008026# Two defines needed to enable largefile support on various platforms
8027# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008028case $ac_sys_system/$ac_sys_release in
8029AIX*)
8030
8031$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8032
8033 ;;
8034esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008040
Martin v. Löwis399a6892002-10-04 10:22:02 +00008041fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008042
Guido van Rossum84e7b241996-08-19 21:59:00 +00008043# Add some code to confdefs.h so that the test for off_t works on SCO
8044cat >> confdefs.h <<\EOF
8045#if defined(SCO_DS)
8046#undef _OFF_T
8047#endif
8048EOF
8049
Guido van Rossumef2255b2000-03-10 22:30:29 +00008050# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008051ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
8056cat >>confdefs.h <<_ACEOF
8057#define mode_t int
8058_ACEOF
8059
8060fi
8061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065else
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
8067cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008069_ACEOF
8070
8071fi
8072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008074if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076else
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
8078cat >>confdefs.h <<_ACEOF
8079#define pid_t int
8080_ACEOF
8081
8082fi
8083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008086#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008087_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008096_ACEOF
8097
8098fi
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8101$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008102if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008106/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
8109_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112 ac_cv_type_uid_t=yes
8113else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114 ac_cv_type_uid_t=no
8115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008116rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8120$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008121if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127
8128fi
8129
Mark Dickinson983bc162012-12-02 12:11:38 +00008130
8131# There are two separate checks for each of the exact-width integer types we
8132# need. First we check whether the type is available using the usual
8133# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8134# and <stdint.h> where available). We then also use the special type checks of
8135# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8136# directly, #define's uint32_t to be a suitable type.
8137
8138ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8139if test "x$ac_cv_type_uint32_t" = xyes; then :
8140
8141$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8142
8143fi
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8146case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147 no|yes) ;; #(
8148 *)
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008151
8152
8153cat >>confdefs.h <<_ACEOF
8154#define uint32_t $ac_cv_c_uint32_t
8155_ACEOF
8156;;
8157 esac
8158
Mark Dickinson983bc162012-12-02 12:11:38 +00008159
8160ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8161if test "x$ac_cv_type_uint64_t" = xyes; then :
8162
8163$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8168case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008169 no|yes) ;; #(
8170 *)
8171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008173
8174
8175cat >>confdefs.h <<_ACEOF
8176#define uint64_t $ac_cv_c_uint64_t
8177_ACEOF
8178;;
8179 esac
8180
Mark Dickinson983bc162012-12-02 12:11:38 +00008181
8182ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8183if test "x$ac_cv_type_int32_t" = xyes; then :
8184
8185$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8186
8187fi
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8190case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008191 no|yes) ;; #(
8192 *)
8193
8194cat >>confdefs.h <<_ACEOF
8195#define int32_t $ac_cv_c_int32_t
8196_ACEOF
8197;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008198esac
8199
Mark Dickinson983bc162012-12-02 12:11:38 +00008200
8201ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8202if test "x$ac_cv_type_int64_t" = xyes; then :
8203
8204$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8205
8206fi
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8209case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008210 no|yes) ;; #(
8211 *)
8212
8213cat >>confdefs.h <<_ACEOF
8214#define int64_t $ac_cv_c_int64_t
8215_ACEOF
8216;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008217esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008218
Mark Dickinson983bc162012-12-02 12:11:38 +00008219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222
Matthias Kloseb9621712010-04-24 17:59:49 +00008223$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008224
8225fi
8226
Stefan Krah1919b7e2012-03-21 18:25:23 +01008227ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8228if test "x$ac_cv_type___uint128_t" = xyes; then :
8229
8230$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8231
8232fi
8233
Jack Jansendd19cf82001-12-06 22:36:17 +00008234
Michael W. Hudson54241132001-12-07 15:38:26 +00008235# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008236# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237# The cast to long int works around a bug in the HP C Compiler
8238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8242$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 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 +00008247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 if test "$ac_cv_type_int" = yes; then
8250 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008252as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008253See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 else
8255 ac_cv_sizeof_int=0
8256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8261$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262
8263
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008267_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268
8269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270# The cast to long int works around a bug in the HP C Compiler
8271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8273# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8275$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 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 +00008280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 if test "$ac_cv_type_long" = yes; then
8283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008285as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008286See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 else
8288 ac_cv_sizeof_long=0
8289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8294$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295
8296
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008299#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301
8302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303# The cast to long int works around a bug in the HP C Compiler
8304# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8305# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8306# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8308$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008309if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 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 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 if test "$ac_cv_type_void_p" = yes; then
8316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008318as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008319See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320 else
8321 ac_cv_sizeof_void_p=0
8322 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8327$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328
8329
8330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008332#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008334
8335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336# The cast to long int works around a bug in the HP C Compiler
8337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8339# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8341$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 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 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 if test "$ac_cv_type_short" = yes; then
8349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008351as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008352See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 else
8354 ac_cv_sizeof_short=0
8355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8360$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361
8362
8363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008365#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008366_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008367
8368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369# The cast to long int works around a bug in the HP C Compiler
8370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8372# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8374$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008375if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008377else
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 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 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$ac_cv_type_float" = yes; then
8382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008384as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008385See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386 else
8387 ac_cv_sizeof_float=0
8388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8393$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394
8395
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008398#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008400
8401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402# The cast to long int works around a bug in the HP C Compiler
8403# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8404# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8405# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8407$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008408if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008410else
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 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 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413else
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 if test "$ac_cv_type_double" = yes; then
8415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8416$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008417as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008418See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 else
8420 ac_cv_sizeof_double=0
8421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8426$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427
8428
8429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008431#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008432_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008433
8434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435# The cast to long int works around a bug in the HP C Compiler
8436# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8437# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8438# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8440$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008443else
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 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 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 if test "$ac_cv_type_fpos_t" = yes; then
8448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008450as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008451See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 else
8453 ac_cv_sizeof_fpos_t=0
8454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8459$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460
8461
8462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008464#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008466
Michael W. Hudson54241132001-12-07 15:38:26 +00008467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8473$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 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 +00008478
Martin v. Löwis18e16552006-02-15 17:27:45 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 if test "$ac_cv_type_size_t" = yes; then
8481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008484See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 else
8486 ac_cv_sizeof_size_t=0
8487 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489
Martin v. Löwis18e16552006-02-15 17:27:45 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8492$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493
8494
8495
Martin v. Löwis18e16552006-02-15 17:27:45 +00008496cat >>confdefs.h <<_ACEOF
8497#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8498_ACEOF
8499
8500
Christian Heimes400adb02008-02-01 08:12:03 +00008501# The cast to long int works around a bug in the HP C Compiler
8502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8504# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8506$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008507if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 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 +00008511
Christian Heimes400adb02008-02-01 08:12:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 if test "$ac_cv_type_pid_t" = yes; then
8514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008516as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008517See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008518 else
8519 ac_cv_sizeof_pid_t=0
8520 fi
8521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522
Christian Heimes400adb02008-02-01 08:12:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8525$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008526
8527
8528
8529cat >>confdefs.h <<_ACEOF
8530#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8531_ACEOF
8532
8533
Michael W. Hudson54241132001-12-07 15:38:26 +00008534
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8536$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008537have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008539/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541int
8542main ()
8543{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008544long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ;
8546 return 0;
8547}
8548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008550
8551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008554 have_long_long=yes
8555
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8559$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008560if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561# The cast to long int works around a bug in the HP C Compiler
8562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8566$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008567if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 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 +00008571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 if test "$ac_cv_type_long_long" = yes; then
8574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008576as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008577See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 else
8579 ac_cv_sizeof_long_long=0
8580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8585$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586
8587
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008590#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008591_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008592
Michael W. Hudson54241132001-12-07 15:38:26 +00008593
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008594fi
8595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8597$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008600/* end confdefs.h. */
8601
8602int
8603main ()
8604{
8605long double x; x = (long double)0;
8606 ;
8607 return 0;
8608}
8609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008610if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008611
8612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008614
8615 have_long_double=yes
8616
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8620$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8627$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_long_double" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639 else
8640 ac_cv_sizeof_long_double=0
8641 fi
8642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8646$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647
8648
8649
8650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8652_ACEOF
8653
8654
8655fi
8656
8657
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8659$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008660have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008662/* end confdefs.h. */
8663
8664int
8665main ()
8666{
8667_Bool x; x = (_Bool)0;
8668 ;
8669 return 0;
8670}
8671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008672if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008673
8674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008676
8677 have_c99_bool=yes
8678
Thomas Woutersb2137042007-02-01 18:02:27 +00008679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8682$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008683if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8689$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 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 +00008694
Thomas Woutersb2137042007-02-01 18:02:27 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 if test "$ac_cv_type__Bool" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 else
8702 ac_cv_sizeof__Bool=0
8703 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705
Thomas Woutersb2137042007-02-01 18:02:27 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8708$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709
8710
8711
Thomas Woutersb2137042007-02-01 18:02:27 +00008712cat >>confdefs.h <<_ACEOF
8713#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8714_ACEOF
8715
8716
8717fi
8718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008720 #include <stdint.h>
8721 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008722 #ifdef HAVE_INTTYPES_H
8723 #include <inttypes.h>
8724 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008725"
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008727
8728cat >>confdefs.h <<_ACEOF
8729#define HAVE_UINTPTR_T 1
8730_ACEOF
8731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8737$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_uintptr_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_uintptr_t=0
8751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8756$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008761#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008763
Michael W. Hudson54241132001-12-07 15:38:26 +00008764
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008765fi
8766
Thomas Wouters89f507f2006-12-13 04:49:30 +00008767
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8773$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008778#ifdef HAVE_SYS_TYPES_H
8779#include <sys/types.h>
8780#endif
8781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_off_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008790 else
8791 ac_cv_sizeof_off_t=0
8792 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8797$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008799
8800
Martin v. Löwis11437992002-04-12 09:54:03 +00008801cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008803_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008804
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8808$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008809if test "$have_long_long" = yes
8810then
8811if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008812 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8817$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008821fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008825fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008826
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827# The cast to long int works around a bug in the HP C Compiler
8828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8832$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837#ifdef HAVE_SYS_TYPES_H
8838#include <sys/types.h>
8839#endif
8840#ifdef HAVE_TIME_H
8841#include <time.h>
8842#endif
8843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if test "$ac_cv_type_time_t" = yes; then
8848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008850as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008851See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852 else
8853 ac_cv_sizeof_time_t=0
8854 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8859$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861
8862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008864#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008865_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008866
Michael W. Hudson54241132001-12-07 15:38:26 +00008867
8868
Trent Mick635f6fb2000-08-23 21:33:05 +00008869# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008870ac_save_cc="$CC"
8871if test "$ac_cv_kpthread" = "yes"
8872then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008873elif test "$ac_cv_kthread" = "yes"
8874then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875elif test "$ac_cv_pthread" = "yes"
8876then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008877fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8880$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008881have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008884
8885 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Guido van Rossum12580492000-09-24 16:47:19 +00008889pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
Matthias Kloseb159a552010-04-25 21:00:44 +00008893
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008895if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008896 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8900$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008901if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8905# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8907$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008908if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912#ifdef HAVE_PTHREAD_H
8913#include <pthread.h>
8914#endif
8915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 if test "$ac_cv_type_pthread_t" = yes; then
8920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008922as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008923See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924 else
8925 ac_cv_sizeof_pthread_t=0
8926 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928
Trent Mick635f6fb2000-08-23 21:33:05 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8931$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933
8934
Martin v. Löwis11437992002-04-12 09:54:03 +00008935cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008936#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008938
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008941CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008942
Michael W. Hudson54241132001-12-07 15:38:26 +00008943
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008944case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008945 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008946 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8947 ;;
8948 Darwin/*)
8949 OTHER_LIBTOOL_OPT=""
8950 ;;
8951esac
8952
8953
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008954
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008955case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008956 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008957 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8958 if test "${enable_universalsdk}"; then
8959 :
8960 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008961 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008962 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008963 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008964 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008965 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008966 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008967 if test ${gcc_version} '<' 4.0
8968 then
8969 LIBTOOL_CRUFT="-lcc_dynamic"
8970 else
8971 LIBTOOL_CRUFT=""
8972 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008974 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975else
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008977/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008978
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008979 #include <unistd.h>
8980 int main(int argc, char*argv[])
8981 {
8982 if (sizeof(long) == 4) {
8983 return 0;
8984 } else {
8985 return 1;
8986 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008987 }
8988
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008990if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008991 ac_osx_32bit=yes
8992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997fi
8998
8999
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009001 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009002 i386)
9003 MACOSX_DEFAULT_ARCH="i386"
9004 ;;
9005 ppc)
9006 MACOSX_DEFAULT_ARCH="ppc"
9007 ;;
9008 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009009 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010 ;;
9011 esac
9012 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009013 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009014 i386)
9015 MACOSX_DEFAULT_ARCH="x86_64"
9016 ;;
9017 ppc)
9018 MACOSX_DEFAULT_ARCH="ppc64"
9019 ;;
9020 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 ;;
9023 esac
9024
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025 fi
9026
9027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009028 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009029 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9032$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009033if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009035 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009037 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9042$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009043 if test $enable_shared = "yes"
9044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009045 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 +00009046 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009050fi
9051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9053$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009054case $ac_sys_system/$ac_sys_release in
9055 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9060$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009061 ;;
9062 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9064$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009065 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009066esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009067
Guido van Rossum0a516c91994-09-12 10:58:40 +00009068# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009069
Michael W. Hudson54241132001-12-07 15:38:26 +00009070
9071
9072
9073
Benjamin Peterson99f03762010-04-11 22:15:28 +00009074
Thomas Wouters477c8d52006-05-27 19:21:47 +00009075
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009076# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9077# -- usually .so, .sl on HP-UX, .dll on Cygwin
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9079$as_echo_n "checking the extension of shared libraries... " >&6; }
9080if test -z "$SHLIB_SUFFIX"; then
9081 case $ac_sys_system in
9082 hp*|HP*)
9083 case `uname -m` in
9084 ia64) SHLIB_SUFFIX=.so;;
9085 *) SHLIB_SUFFIX=.sl;;
9086 esac
9087 ;;
9088 CYGWIN*) SHLIB_SUFFIX=.dll;;
9089 *) SHLIB_SUFFIX=.so;;
9090 esac
9091fi
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9093$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009094
Guido van Rossum0a516c91994-09-12 10:58:40 +00009095# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009096# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009097# (Shared libraries in this instance are shared modules to be loaded into
9098# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9100$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009101if test -z "$LDSHARED"
9102then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009104 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009105 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009106 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009107 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009108 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009109 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009111 if test "$GCC" = "yes" ; then
9112 LDSHARED='$(CC) -shared'
9113 LDCXXSHARED='$(CXX) -shared'
9114 else
9115 LDSHARED='$(CC) -G'
9116 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009117 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009118 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119 if test "$GCC" = "yes" ; then
9120 LDSHARED='$(CC) -shared'
9121 LDCXXSHARED='$(CXX) -shared'
9122 else
9123 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009124 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009125 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009126 LDSHARED='$(CC) -bundle'
9127 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009128 if test "$enable_framework" ; then
9129 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009130 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9131 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009132 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009133 else
9134 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009135 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009137 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009138 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009139 LDSHARED='$(CC) -bundle'
9140 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009141 if test "$enable_framework" ; then
9142 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009143 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9144 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009146 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009147 # No framework, use the Python app as bundle-loader
9148 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009149 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009150 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009151 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009152 Darwin/*)
9153 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9154 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009155
Ned Deily36820b62014-06-25 13:44:22 -07009156 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9157 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9158 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9159 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9160 if test ${dep_target_major} -eq 10 && \
9161 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009162 then
Ned Deily36820b62014-06-25 13:44:22 -07009163 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009164 LDSHARED='$(CC) -bundle'
9165 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009166 if test "$enable_framework" ; then
9167 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009168 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9169 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009171 else
9172 # No framework, use the Python app as bundle-loader
9173 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9174 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009176 fi
Ned Deily36820b62014-06-25 13:44:22 -07009177 else
9178 # building for OS X 10.3 and later
9179 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9180 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9181 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009182 fi
9183 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 Linux*|GNU*|QNX*)
9185 LDSHARED='$(CC) -shared'
9186 LDCXXSHARED='$(CXX) -shared';;
9187 BSD/OS*/4*)
9188 LDSHARED="gcc -shared"
9189 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009190 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009191 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009192 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009195 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009196 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009197 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009198 OpenBSD*)
9199 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9200 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009201 LDSHARED='$(CC) -shared $(CCSHARED)'
9202 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009203 else
9204 case `uname -r` in
9205 [01].* | 2.[0-7] | 2.[0-7].*)
9206 LDSHARED="ld -Bshareable ${LDFLAGS}"
9207 ;;
9208 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009209 LDSHARED='$(CC) -shared $(CCSHARED)'
9210 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009211 ;;
9212 esac
9213 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009215 LDSHARED='$(CC) -shared'
9216 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009217 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 if test "$GCC" = "yes" ; then
9219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared'
9221 else
9222 LDSHARED='$(CC) -G'
9223 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009224 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009225 SCO_SV*)
9226 LDSHARED='$(CC) -Wl,-G,-Bexport'
9227 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9228 CYGWIN*)
9229 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9230 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009231 *) LDSHARED="ld";;
9232 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9235$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009237BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009239# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9241$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009242if test -z "$CCSHARED"
9243then
Guido van Rossum07397971997-04-29 21:49:50 +00009244 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009245 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009246 then CCSHARED="-fPIC";
9247 elif test `uname -p` = sparc;
9248 then CCSHARED="-xcode=pic32";
9249 else CCSHARED="-Kpic";
9250 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009251 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009252 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009253 else CCSHARED="+z";
9254 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009255 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009256 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009257 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009258 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009259 if test "$GCC" = "yes"
9260 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009261 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009262 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009263 SCO_SV*)
9264 if test "$GCC" = "yes"
9265 then CCSHARED="-fPIC"
9266 else CCSHARED="-Kpic -belf"
9267 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009268 IRIX*/6*) case $CC in
9269 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009270 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009271 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9275$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009277# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9279$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280if test -z "$LINKFORSHARED"
9281then
Guido van Rossum07397971997-04-29 21:49:50 +00009282 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009283 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009284 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009285 LINKFORSHARED="-Wl,-E -Wl,+s";;
9286# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009287 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009288 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009291 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009292
9293 # Issue #18075: the default maximum stack size (8MBytes) is too
9294 # small for the default recursion limit. Increase the stack size
9295 # to ensure that tests don't crash
9296 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9297
Jack Jansene578a632001-08-15 01:27:14 +00009298 if test "$enable_framework"
9299 then
Jack Jansenda49e192005-01-07 13:08:22 +00009300 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009301 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009302 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009303 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009304 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009305 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009306 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009307 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9308 then
9309 LINKFORSHARED="-Wl,--export-dynamic"
9310 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009311 SunOS/5*) case $CC in
9312 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009313 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009314 then
9315 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009316 fi;;
9317 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009318 CYGWIN*)
9319 if test $enable_shared = "no"
9320 then
9321 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9322 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009323 QNX*)
9324 # -Wl,-E causes the symbols to be added to the dynamic
9325 # symbol table so that they can be found when a module
9326 # is loaded. -N 2048K causes the stack size to be set
9327 # to 2048 kilobytes so that the stack doesn't overflow
9328 # when running test_compile.py.
9329 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9333$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334
Michael W. Hudson54241132001-12-07 15:38:26 +00009335
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9338$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009339if test ! "$LIBRARY" = "$LDLIBRARY"
9340then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009341 case $ac_sys_system in
9342 CYGWIN*)
9343 # Cygwin needs CCSHARED when building extension DLLs
9344 # but not when building the interpreter DLL.
9345 CFLAGSFORSHARED='';;
9346 *)
9347 CFLAGSFORSHARED='$(CCSHARED)'
9348 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9351$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009352
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009353# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9354# library (with --enable-shared).
9355# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009356# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9357# if it is not required, since it creates a dependency of the shared library
9358# to LIBS. This, in turn, means that applications linking the shared libpython
9359# don't need to link LIBS explicitly. The default should be only changed
9360# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9363$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009365 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009366 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9369$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009370
9371
Guido van Rossum627b2d71993-12-24 10:39:16 +00009372# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9374$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009375if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009376 $as_echo_n "(cached) " >&6
9377else
9378 ac_check_lib_save_LIBS=$LIBS
9379LIBS="-lsendfile $LIBS"
9380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9381/* end confdefs.h. */
9382
9383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
9386#ifdef __cplusplus
9387extern "C"
9388#endif
9389char sendfile ();
9390int
9391main ()
9392{
9393return sendfile ();
9394 ;
9395 return 0;
9396}
9397_ACEOF
9398if ac_fn_c_try_link "$LINENO"; then :
9399 ac_cv_lib_sendfile_sendfile=yes
9400else
9401 ac_cv_lib_sendfile_sendfile=no
9402fi
9403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
9405LIBS=$ac_check_lib_save_LIBS
9406fi
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9408$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009409if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009410 cat >>confdefs.h <<_ACEOF
9411#define HAVE_LIBSENDFILE 1
9412_ACEOF
9413
9414 LIBS="-lsendfile $LIBS"
9415
9416fi
9417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9419$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009422else
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009424LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431#ifdef __cplusplus
9432extern "C"
9433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009434char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009445else
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009450LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBDL 1
9457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009458
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009459 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009461fi
9462 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9464$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +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="-ldld $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 shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return shl_load ();
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_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9498$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDLD 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009508
Georg Brandlb1441c72009-01-03 22:33:39 +00009509# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009510if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9512$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009513if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009515else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009516 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520/* Override any GCC internal prototype to avoid an error.
9521 Use char because int might match the return type of a GCC
9522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009523#ifdef __cplusplus
9524extern "C"
9525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009526char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009527int
9528main ()
9529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ;
9532 return 0;
9533}
9534_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535for ac_lib in '' pthread rt posix4; do
9536 if test -z "$ac_lib"; then
9537 ac_res="none required"
9538 else
9539 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009540 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009545rm -f core conftest.err conftest.$ac_objext \
9546 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009547 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550done
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553else
9554 ac_cv_search_sem_init=no
9555fi
9556rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009557LIBS=$ac_func_search_save_LIBS
9558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9560$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009564
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009565fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009566 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009567 # posix4 on Solaris 2.6
9568 # pthread (first!) on Linux
9569fi
9570
Martin v. Löwis19d17342003-06-14 21:03:05 +00009571# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9573$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009574if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009576else
9577 ac_check_lib_save_LIBS=$LIBS
9578LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582/* Override any GCC internal prototype to avoid an error.
9583 Use char because int might match the return type of a GCC
9584 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009585#ifdef __cplusplus
9586extern "C"
9587#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009588char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009589int
9590main ()
9591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009593 ;
9594 return 0;
9595}
9596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009598 ac_cv_lib_intl_textdomain=yes
9599else
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602rm -f core conftest.err conftest.$ac_objext \
9603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009604LIBS=$ac_check_lib_save_LIBS
9605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9607$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009608if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611
Brett Cannonc6d936e2009-06-07 20:09:53 +00009612 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613fi
9614
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009615
9616# checks for system dependent C++ extensions support
9617case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9619$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009621/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009622
Georg Brandl59e87bd2011-02-15 19:48:59 +00009623 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009624int
9625main ()
9626{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009627loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 ;
9629 return 0;
9630}
Matthias Kloseb159a552010-04-25 21:00:44 +00009631
Martin v. Löwis11437992002-04-12 09:54:03 +00009632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009633if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009634
Matthias Kloseb159a552010-04-25 21:00:44 +00009635
Matthias Kloseb9621712010-04-24 17:59:49 +00009636$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009637
Matthias Kloseb159a552010-04-25 21:00:44 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009639$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009640
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009641else
Matthias Kloseb159a552010-04-25 21:00:44 +00009642
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009644$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009645
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009649 *) ;;
9650esac
9651
Christian Heimes985ecdc2013-11-20 11:46:18 +01009652# check for systems that require aligned memory access
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9654$as_echo_n "checking aligned memory access is required... " >&6; }
9655if test "$cross_compiling" = yes; then :
9656 aligned_required=yes
9657else
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9659/* end confdefs.h. */
9660
9661int main()
9662{
9663 char s[16];
9664 int i, *p1, *p2;
9665 for (i=0; i < 16; i++)
9666 s[i] = i;
9667 p1 = (int*)(s+1);
9668 p2 = (int*)(s+2);
9669 if (*p1 == *p2)
9670 return 1;
9671 return 0;
9672}
9673
9674_ACEOF
9675if ac_fn_c_try_run "$LINENO"; then :
9676 aligned_required=no
9677else
9678 aligned_required=yes
9679fi
9680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9681 conftest.$ac_objext conftest.beam conftest.$ac_ext
9682fi
9683
9684
9685if test "$aligned_required" = yes ; then
9686
9687$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9688
9689fi
9690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9691$as_echo "$aligned_required" >&6; }
9692
9693
9694# str, bytes and memoryview hash algorithm
9695
9696
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9698$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9699
9700# Check whether --with-hash_algorithm was given.
9701if test "${with_hash_algorithm+set}" = set; then :
9702 withval=$with_hash_algorithm;
9703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9704$as_echo "$withval" >&6; }
9705case "$withval" in
9706 siphash24)
9707 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9708
9709 ;;
9710 fnv)
9711 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9712
9713 ;;
9714 *)
9715 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9716 ;;
9717esac
9718
9719else
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9721$as_echo "default" >&6; }
9722fi
9723
9724
Charles-François Natalid30b0222014-05-08 23:08:51 +01009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9726$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9727
9728# Check whether --with-address_sanitizer was given.
9729if test "${with_address_sanitizer+set}" = set; then :
9730 withval=$with_address_sanitizer;
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9732$as_echo "$withval" >&6; }
9733BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9734LDFLAGS="-fsanitize=address $LDFLAGS"
9735
9736else
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
9739fi
9740
9741
Guido van Rossum70c7f481998-03-26 18:44:10 +00009742# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9744$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009745if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009747else
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009749LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753/* Override any GCC internal prototype to avoid an error.
9754 Use char because int might match the return type of a GCC
9755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756#ifdef __cplusplus
9757extern "C"
9758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009759char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760int
9761main ()
9762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ;
9765 return 0;
9766}
9767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009773rm -f core conftest.err conftest.$ac_objext \
9774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009775LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9778$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009779if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009780 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009781fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009782 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9784$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009785if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009787else
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009789LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793/* Override any GCC internal prototype to avoid an error.
9794 Use char because int might match the return type of a GCC
9795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796#ifdef __cplusplus
9797extern "C"
9798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009799char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009800int
9801main ()
9802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ;
9805 return 0;
9806}
9807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009810else
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009813rm -f core conftest.err conftest.$ac_objext \
9814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9818$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009819if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009820 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009821fi
9822 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009823
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9825$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009828if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9831$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009832LIBS="$withval $LIBS"
9833
9834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837fi
9838
Guido van Rossum7f43da71994-08-01 12:15:30 +00009839
Victor Stinner8291b5e2015-03-20 16:03:14 +01009840
9841
9842
9843
9844
9845
9846
9847if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9848 if test -n "$ac_tool_prefix"; then
9849 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9850set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if ${ac_cv_path_PKG_CONFIG+:} false; then :
9854 $as_echo_n "(cached) " >&6
9855else
9856 case $PKG_CONFIG in
9857 [\\/]* | ?:[\\/]*)
9858 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9859 ;;
9860 *)
9861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864 IFS=$as_save_IFS
9865 test -z "$as_dir" && as_dir=.
9866 for ac_exec_ext in '' $ac_executable_extensions; do
9867 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9868 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870 break 2
9871 fi
9872done
9873 done
9874IFS=$as_save_IFS
9875
9876 ;;
9877esac
9878fi
9879PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9880if test -n "$PKG_CONFIG"; then
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9882$as_echo "$PKG_CONFIG" >&6; }
9883else
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889fi
9890if test -z "$ac_cv_path_PKG_CONFIG"; then
9891 ac_pt_PKG_CONFIG=$PKG_CONFIG
9892 # Extract the first word of "pkg-config", so it can be a program name with args.
9893set dummy pkg-config; ac_word=$2
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9895$as_echo_n "checking for $ac_word... " >&6; }
9896if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9897 $as_echo_n "(cached) " >&6
9898else
9899 case $ac_pt_PKG_CONFIG in
9900 [\\/]* | ?:[\\/]*)
9901 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9902 ;;
9903 *)
9904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9905for as_dir in $PATH
9906do
9907 IFS=$as_save_IFS
9908 test -z "$as_dir" && as_dir=.
9909 for ac_exec_ext in '' $ac_executable_extensions; do
9910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9911 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9913 break 2
9914 fi
9915done
9916 done
9917IFS=$as_save_IFS
9918
9919 ;;
9920esac
9921fi
9922ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9923if test -n "$ac_pt_PKG_CONFIG"; then
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9925$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9926else
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
9929fi
9930
9931 if test "x$ac_pt_PKG_CONFIG" = x; then
9932 PKG_CONFIG=""
9933 else
9934 case $cross_compiling:$ac_tool_warned in
9935yes:)
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9937$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9938ac_tool_warned=yes ;;
9939esac
9940 PKG_CONFIG=$ac_pt_PKG_CONFIG
9941 fi
9942else
9943 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9944fi
9945
9946fi
9947if test -n "$PKG_CONFIG"; then
9948 _pkg_min_version=0.9.0
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9950$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9951 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9953$as_echo "yes" >&6; }
9954 else
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
9957 PKG_CONFIG=""
9958 fi
9959fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009960
9961# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9963$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009964
9965# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009966if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009967 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009968else
9969 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009970fi
9971
9972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9974$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009975
9976# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9978$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009979
9980# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009981if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009982 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009983else
9984 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009985fi
9986
9987
9988if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009989 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9990else
9991 LIBFFI_INCLUDEDIR=""
9992fi
9993
9994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9996$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009997
Stefan Krah60187b52012-03-23 19:06:27 +01009998# Check for use of the system libmpdec library
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10000$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10001
10002# Check whether --with-system_libmpdec was given.
10003if test "${with_system_libmpdec+set}" = set; then :
10004 withval=$with_system_libmpdec;
10005else
10006 with_system_libmpdec="no"
10007fi
10008
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10011$as_echo "$with_system_libmpdec" >&6; }
10012
Benjamin Peterson076ed002010-10-31 17:11:02 +000010013# Check for support for loadable sqlite extensions
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10015$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10016# Check whether --enable-loadable-sqlite-extensions was given.
10017if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10018 enableval=$enable_loadable_sqlite_extensions;
10019else
10020 enable_loadable_sqlite_extensions="no"
10021fi
10022
10023
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10025$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10026
Ned Deilyd819b932013-09-06 01:07:05 -070010027# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10028
10029
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10031$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10032
10033# Check whether --with-tcltk-includes was given.
10034if test "${with_tcltk_includes+set}" = set; then :
10035 withval=$with_tcltk_includes;
10036else
10037 with_tcltk_includes="default"
10038fi
10039
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10041$as_echo "$with_tcltk_includes" >&6; }
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10043$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10044
10045# Check whether --with-tcltk-libs was given.
10046if test "${with_tcltk_libs+set}" = set; then :
10047 withval=$with_tcltk_libs;
10048else
10049 with_tcltk_libs="default"
10050fi
10051
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10053$as_echo "$with_tcltk_libs" >&6; }
10054if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10055then
10056 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10057 then
10058 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10059 fi
10060 TCLTK_INCLUDES=""
10061 TCLTK_LIBS=""
10062else
10063 TCLTK_INCLUDES="$with_tcltk_includes"
10064 TCLTK_LIBS="$with_tcltk_libs"
10065fi
10066
Matthias Klose55708cc2009-04-30 08:06:49 +000010067# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10069$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010070
10071# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010072if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010073 withval=$with_dbmliborder;
10074if test x$with_dbmliborder = xyes
10075then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010076as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010077else
10078 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10079 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10080 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010081 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010082 fi
10083 done
10084fi
10085fi
10086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10088$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010089
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010090# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010091
10092
Matthias Kloseb9621712010-04-24 17:59:49 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10094$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010097if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098 withval=$with_signal_module;
10099fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010100
10101
10102if test -z "$with_signal_module"
10103then with_signal_module="yes"
10104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10106$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010107
10108if test "${with_signal_module}" = "yes"; then
10109 USE_SIGNAL_MODULE=""
10110 SIGNAL_OBJS=""
10111else
10112 USE_SIGNAL_MODULE="#"
10113 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10114fi
10115
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010116# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010117
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010118USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
10122# Templates for things AC_DEFINEd more than once.
10123# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010124
10125
Martin v. Löwis11437992002-04-12 09:54:03 +000010126
Matthias Kloseb9621712010-04-24 17:59:49 +000010127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10128$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010131if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 withval=$with_threads;
10133fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010134
10135
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010136# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010139if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 withval=$with_thread; with_threads=$with_thread
10141fi
10142
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010143
10144if test -z "$with_threads"
10145then with_threads="yes"
10146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10148$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010149
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010150
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010151if test "$with_threads" = "no"
10152then
10153 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010154elif test "$ac_cv_pthread_is_default" = yes
10155then
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010157
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010158 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010160
10161 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010163elif test "$ac_cv_kpthread" = "yes"
10164then
10165 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010166 if test "$ac_cv_cxx_thread" = "yes"; then
10167 CXX="$CXX -Kpthread"
10168 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010170
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010171 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010173elif test "$ac_cv_kthread" = "yes"
10174then
10175 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010176 if test "$ac_cv_cxx_thread" = "yes"; then
10177 CXX="$CXX -Kthread"
10178 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010180
10181 posix_threads=yes
10182 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010183elif test "$ac_cv_pthread" = "yes"
10184then
10185 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010186 if test "$ac_cv_cxx_thread" = "yes"; then
10187 CXX="$CXX -pthread"
10188 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010190
10191 posix_threads=yes
10192 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010193else
10194 if test ! -z "$with_threads" -a -d "$with_threads"
10195 then LDFLAGS="$LDFLAGS -L$with_threads"
10196 fi
10197 if test ! -z "$withval" -a -d "$withval"
10198 then LDFLAGS="$LDFLAGS -L$withval"
10199 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010200
10201 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010202 # define _POSIX_THREADS in unistd.h. Some apparently don't
10203 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10205$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010207/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010208
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010209#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010210#ifdef _POSIX_THREADS
10211yes
10212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
10214_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217 unistd_defines_pthreads=yes
10218else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010219 unistd_defines_pthreads=no
10220fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010221rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10224$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010225
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010227
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010228 # Just looking for pthread_create in libpthread is not enough:
10229 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10230 # So we really have to include pthread.h, and then link.
10231 _libs=$LIBS
10232 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10234$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010237
10238#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010239#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010240
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010241void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010242int
10243main ()
10244{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010245
10246pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ;
10248 return 0;
10249}
10250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010251if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10254$as_echo "yes" >&6; }
10255 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010256
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010258 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010259else
Martin v. Löwis11437992002-04-12 09:54:03 +000010260
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010261 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010263if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010265
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010266 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010267 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010268else
Guido van Rossumad678af1998-10-02 14:42:15 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10271$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010272if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010276LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280/* Override any GCC internal prototype to avoid an error.
10281 Use char because int might match the return type of a GCC
10282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#ifdef __cplusplus
10284extern "C"
10285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010286char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010287int
10288main ()
10289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ;
10292 return 0;
10293}
10294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010297else
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010300rm -f core conftest.err conftest.$ac_objext \
10301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010302LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10305$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010306if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010309 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010310 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010311 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010312else
Greg Steinadf63d62000-07-05 10:38:09 +000010313
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10315$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010316if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010318else
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010320LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324/* Override any GCC internal prototype to avoid an error.
10325 Use char because int might match the return type of a GCC
10326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327#ifdef __cplusplus
10328extern "C"
10329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010330char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010331int
10332main ()
10333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010341else
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344rm -f core conftest.err conftest.$ac_objext \
10345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010346LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10349$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010350if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010353 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010354 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010355 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010356else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10359$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
10377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010390LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10393$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010398 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010399 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010400else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10403$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010408LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412/* Override any GCC internal prototype to avoid an error.
10413 Use char because int might match the return type of a GCC
10414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010415#ifdef __cplusplus
10416extern "C"
10417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010418char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419int
10420main ()
10421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ;
10424 return 0;
10425}
10426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010427if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010429else
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432rm -f core conftest.err conftest.$ac_objext \
10433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010434LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10437$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010438if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010441 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010442 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010443 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010445
Martin v. Löwis130fb172001-07-19 11:00:41 +000010446 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010447fi
10448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010450fi
10451
Guido van Rossum0be3e491997-05-22 20:33:33 +000010452fi
10453
Guido van Rossum49545951997-12-02 19:28:29 +000010454fi
10455
Guido van Rossumb93a8621998-05-07 13:27:32 +000010456fi
10457
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010459rm -f core conftest.err conftest.$ac_objext \
10460 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10463$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010464if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010466else
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010468LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010472/* Override any GCC internal prototype to avoid an error.
10473 Use char because int might match the return type of a GCC
10474 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010475#ifdef __cplusplus
10476extern "C"
10477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010478char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010479int
10480main ()
10481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010482return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ;
10484 return 0;
10485}
10486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010489else
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010492rm -f core conftest.err conftest.$ac_objext \
10493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010494LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10497$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010498if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010500
Martin v. Löwis130fb172001-07-19 11:00:41 +000010501 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010502 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010503 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010504fi
10505
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010506
Neal Norwitza978ab02002-11-02 16:58:05 +000010507 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10509$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010510if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010514LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518/* Override any GCC internal prototype to avoid an error.
10519 Use char because int might match the return type of a GCC
10520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010521#ifdef __cplusplus
10522extern "C"
10523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010524char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010525int
10526main ()
10527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ;
10530 return 0;
10531}
10532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010535else
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010538rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10543$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010544if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010547 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010548 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010549 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010550fi
10551
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010552 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010554
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555if test "$posix_threads" = "yes"; then
10556 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010559
10560 fi
10561
10562 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10563 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010564 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010565$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010566
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567 ;;
10568 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010569$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570
10571 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010572 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010573$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010574
10575 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576 esac
10577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10579$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010580 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582else
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584 ac_cv_pthread_system_supported=no
10585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010587/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010588
10589 #include <stdio.h>
10590 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 void *foo(void *parm) {
10592 return NULL;
10593 }
10594 main() {
10595 pthread_attr_t attr;
10596 pthread_t id;
10597 if (pthread_attr_init(&attr)) exit(-1);
10598 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10599 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10600 exit(0);
10601 }
10602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604 ac_cv_pthread_system_supported=yes
10605else
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613fi
10614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10616$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617 if test "$ac_cv_pthread_system_supported" = "yes"; then
10618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620
10621 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 for ac_func in pthread_sigmask
10623do :
10624 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010625if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010627#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010629 case $ac_sys_system in
10630 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010633
10634 ;;
10635 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636fi
10637done
10638
Christian Heimesf77b4b22013-08-21 13:26:05 +020010639 for ac_func in pthread_atfork
10640do :
10641 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10642if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10643 cat >>confdefs.h <<_ACEOF
10644#define HAVE_PTHREAD_ATFORK 1
10645_ACEOF
10646
10647fi
10648done
10649
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650fi
10651
10652
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10656$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663 ipv6=no
10664 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10666$as_echo "yes" >&6; }
10667 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668
10669 ipv6=yes
10670 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672else
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010675/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 /* AF_INET6 available check */
10677#include <sys/types.h>
10678#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010679int
10680main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010682int domain = AF_INET6;
10683 ;
10684 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685}
Martin v. Löwis11437992002-04-12 09:54:03 +000010686_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010687if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10690$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010692
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693else
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010698
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10704$as_echo_n "checking if RFC2553 API is available... " >&6; }
10705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010707
10708 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010709#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010710int
10711main ()
10712{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010713struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010714 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 ;
10716 return 0;
10717}
Matthias Kloseb159a552010-04-25 21:00:44 +000010718
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010721
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010724 ipv6=yes
10725
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010726else
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010729$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010730 ipv6=no
10731
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010734fi
10735
10736if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738
10739fi
10740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741fi
10742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743
10744ipv6type=unknown
10745ipv6lib=none
10746ipv6trylibc=no
10747
10748if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10750$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010751 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10752 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753 case $i in
10754 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758#include <netinet/in.h>
10759#ifdef IPV6_INRIA_VERSION
10760yes
10761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010762_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010765 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010767rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768
10769 ;;
10770 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010773
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774#include <netinet/in.h>
10775#ifdef __KAME__
10776yes
10777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010778_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781 ipv6type=$i;
10782 ipv6lib=inet6
10783 ipv6libdir=/usr/local/v6/lib
10784 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010786rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787
10788 ;;
10789 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793#include <features.h>
10794#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10795yes
10796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800 ipv6type=$i;
10801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010803rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804
10805 ;;
10806 linux-inet6)
10807 if test -d /usr/inet6; then
10808 ipv6type=$i
10809 ipv6lib=inet6
10810 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010811 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812 fi
10813 ;;
10814 solaris)
10815 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010816 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817 ipv6type=$i
10818 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 fi
10820 fi
10821 ;;
10822 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826#include <sys/param.h>
10827#ifdef _TOSHIBA_INET6
10828yes
10829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010830_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 ipv6type=$i;
10834 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010835 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010837rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838
10839 ;;
10840 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010842/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010843
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844#include </usr/local/v6/include/sys/v6config.h>
10845#ifdef __V6D__
10846yes
10847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010848_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 ipv6type=$i;
10852 ipv6lib=v6;
10853 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010854 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010856rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857
10858 ;;
10859 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010862
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863#include <sys/param.h>
10864#ifdef _ZETA_MINAMI_INET6
10865yes
10866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870 ipv6type=$i;
10871 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010872 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010874rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875
10876 ;;
10877 esac
10878 if test "$ipv6type" != "unknown"; then
10879 break
10880 fi
10881 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10883$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
10885
10886if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10887 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10888 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10889 echo "using lib$ipv6lib"
10890 else
10891 if test $ipv6trylibc = "yes"; then
10892 echo "using libc"
10893 else
10894 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10895 echo "You need to fetch lib$ipv6lib.a from appropriate"
10896 echo 'ipv6 kit and compile beforehand.'
10897 exit 1
10898 fi
10899 fi
10900fi
10901
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10903$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10905/* end confdefs.h. */
10906 /* CAN_RAW_FD_FRAMES available check */
10907#include <linux/can/raw.h>
10908int
10909main ()
10910{
10911int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10912 ;
10913 return 0;
10914}
10915_ACEOF
10916if ac_fn_c_try_compile "$LINENO"; then :
10917
10918
10919$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10920
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10922$as_echo "yes" >&6; }
10923
10924else
10925
10926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927$as_echo "no" >&6; }
10928
10929fi
10930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10933$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010935/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
10937 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010938int
10939main ()
10940{
10941FSIORefNum fRef = 0
10942 ;
10943 return 0;
10944}
Matthias Kloseb159a552010-04-25 21:00:44 +000010945
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010948
Matthias Kloseb159a552010-04-25 21:00:44 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10953$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010954
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010955else
Matthias Kloseb159a552010-04-25 21:00:44 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010959
10960fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10962
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010963# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10965$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 withval=$with_doc_strings;
10970fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010971
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010972
10973if test -z "$with_doc_strings"
10974then with_doc_strings="yes"
10975fi
10976if test "$with_doc_strings" != "no"
10977then
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010980
10981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10983$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010984
Antoine Pitrou042b1282010-08-13 21:15:58 +000010985# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10987$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010992if test "$withval" != no
10993then
10994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10998$as_echo "yes" >&6; }
10999else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011001fi
11002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005fi
11006
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011007
11008# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11010$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014 withval=$with_pymalloc;
11015fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011016
Neil Schemenauera35c6882001-02-27 04:45:05 +000011017
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011019then
11020 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011021fi
11022if test "$with_pymalloc" != "no"
11023then
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011026
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011027 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11030$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011031
Benjamin Peterson05159c42009-12-03 03:01:27 +000011032# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11034$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035
11036# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011037if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038 withval=$with_valgrind;
11039else
11040 with_valgrind=no
11041fi
11042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11044$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011045if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 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 +020011047if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011050
11051else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011052 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053
11054fi
11055
11056
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011057 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058fi
11059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011060# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011061
Guido van Rossum98935bf2001-09-05 19:13:16 +000011062DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011063
Guido van Rossume97ee181999-12-20 21:27:22 +000011064# the dlopen() function means we might want to use dynload_shlib.o. some
11065# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011066for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011067do :
11068 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011069if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011073
Guido van Rossume97ee181999-12-20 21:27:22 +000011074fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011075done
Guido van Rossume97ee181999-12-20 21:27:22 +000011076
Michael W. Hudson54241132001-12-07 15:38:26 +000011077
Guido van Rossume97ee181999-12-20 21:27:22 +000011078# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11079# loading of modules.
11080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11082$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011083if test -z "$DYNLOADFILE"
11084then
11085 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011086 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11087 if test "$ac_cv_func_dlopen" = yes
11088 then DYNLOADFILE="dynload_shlib.o"
11089 else DYNLOADFILE="dynload_aix.o"
11090 fi
11091 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011092 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011093 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11094 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011095 *)
11096 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11097 # out any dynamic loading
11098 if test "$ac_cv_func_dlopen" = yes
11099 then DYNLOADFILE="dynload_shlib.o"
11100 else DYNLOADFILE="dynload_stub.o"
11101 fi
11102 ;;
11103 esac
11104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11106$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011107if test "$DYNLOADFILE" != "dynload_stub.o"
11108then
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
Matthias Kloseb9621712010-04-24 17:59:49 +000011110$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011111
11112fi
11113
Neil Schemenauer4e425612001-06-19 15:44:15 +000011114# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11115
Michael W. Hudson54241132001-12-07 15:38:26 +000011116
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11118$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011119if test -z "$MACHDEP_OBJS"
11120then
Jack Jansene578a632001-08-15 01:27:14 +000011121 MACHDEP_OBJS=$extra_machdep_objs
11122else
11123 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011124fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011125if test -z "$MACHDEP_OBJS"; then
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11127$as_echo "none" >&6; }
11128else
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11130$as_echo "$MACHDEP_OBJS" >&6; }
11131fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011132
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011134for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011135 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011136 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011137 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011138 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011139 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011140 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011141 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11142 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011143 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011144 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011145 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011146 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011147 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011148 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011149 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11150 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011151 sigaction sigaltstack siginterrupt sigpending sigrelse \
11152 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011153 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011154 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011155 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011156do :
11157 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011159if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011163
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011164fi
11165done
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011168ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11169 #include <dirent.h>
11170"
11171if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11172
11173$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11174
11175fi
11176
11177
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178# For some functions, having a definition is not sufficient, since
11179# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11181$as_echo_n "checking for chroot... " >&6; }
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011183/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011184#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011185int
11186main ()
11187{
11188void *x=chroot
11189 ;
11190 return 0;
11191}
11192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011196
Matthias Kloseb159a552010-04-25 21:00:44 +000011197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202
11203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11206$as_echo_n "checking for link... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011209#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011210int
11211main ()
11212{
11213void *x=link
11214 ;
11215 return 0;
11216}
11217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011221
Matthias Kloseb159a552010-04-25 21:00:44 +000011222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227
11228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11231$as_echo_n "checking for symlink... " >&6; }
11232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011234#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011235int
11236main ()
11237{
11238void *x=symlink
11239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011246
Matthias Kloseb159a552010-04-25 21:00:44 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249else
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252
11253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11256$as_echo_n "checking for fchdir... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011259#include <unistd.h>
11260int
11261main ()
11262{
11263void *x=fchdir
11264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011271
Matthias Kloseb159a552010-04-25 21:00:44 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011274else
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011277
11278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11281$as_echo_n "checking for fsync... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011284#include <unistd.h>
11285int
11286main ()
11287{
11288void *x=fsync
11289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011294
Matthias Kloseb9621712010-04-24 17:59:49 +000011295$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011296
Matthias Kloseb159a552010-04-25 21:00:44 +000011297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011299else
Matthias Kloseb9621712010-04-24 17:59:49 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011302
11303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11306$as_echo_n "checking for fdatasync... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011309#include <unistd.h>
11310int
11311main ()
11312{
11313void *x=fdatasync
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011327
11328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11331$as_echo_n "checking for epoll... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011333/* end confdefs.h. */
11334#include <sys/epoll.h>
11335int
11336main ()
11337{
11338void *x=epoll_create
11339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011349else
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011352
11353fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11356$as_echo_n "checking for epoll_create1... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11358/* end confdefs.h. */
11359#include <sys/epoll.h>
11360int
11361main ()
11362{
11363void *x=epoll_create1
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368if ac_fn_c_try_compile "$LINENO"; then :
11369
11370$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11371
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11373$as_echo "yes" >&6; }
11374else
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
11377
11378fi
11379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11381$as_echo_n "checking for kqueue... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011383/* end confdefs.h. */
11384
11385#include <sys/types.h>
11386#include <sys/event.h>
11387
11388int
11389main ()
11390{
11391int x=kqueue()
11392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011399
Matthias Kloseb159a552010-04-25 21:00:44 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011405
11406fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11409$as_echo_n "checking for prlimit... " >&6; }
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411/* end confdefs.h. */
11412
11413#include <sys/time.h>
11414#include <sys/resource.h>
11415
11416int
11417main ()
11418{
11419void *x=prlimit
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424if ac_fn_c_try_compile "$LINENO"; then :
11425
11426$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
11430else
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
11433
11434fi
11435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11436
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437# On some systems (eg. FreeBSD 5), we would find a definition of the
11438# functions ctermid_r, setgroups in the library, but no prototype
11439# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11440# address to avoid compiler warnings and potential miscompilations
11441# because of the missing prototypes.
11442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11444$as_echo_n "checking for ctermid_r... " >&6; }
11445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011446/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011447
Martin v. Löwisd5843682002-11-21 20:41:28 +000011448#include <stdio.h>
11449
Martin v. Löwisd5843682002-11-21 20:41:28 +000011450int
11451main ()
11452{
11453void* p = ctermid_r
11454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011461
Matthias Kloseb159a552010-04-25 21:00:44 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011463$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011467
11468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11470
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11472$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011473if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011474 $as_echo_n "(cached) " >&6
11475else
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011478#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011479int
11480main ()
11481{
11482void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011483
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011489 ac_cv_flock_decl=yes
11490else
11491 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011492
11493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011495
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011496fi
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11498$as_echo "$ac_cv_flock_decl" >&6; }
11499if test "x${ac_cv_flock_decl}" = xyes; then
11500 for ac_func in flock
11501do :
11502 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011503if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011504 cat >>confdefs.h <<_ACEOF
11505#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011506_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011507
Antoine Pitroua3000072010-09-07 14:52:42 +000011508else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011510$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011511if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011512 $as_echo_n "(cached) " >&6
11513else
11514 ac_check_lib_save_LIBS=$LIBS
11515LIBS="-lbsd $LIBS"
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518
11519/* Override any GCC internal prototype to avoid an error.
11520 Use char because int might match the return type of a GCC
11521 builtin and then its argument prototype would still apply. */
11522#ifdef __cplusplus
11523extern "C"
11524#endif
11525char flock ();
11526int
11527main ()
11528{
11529return flock ();
11530 ;
11531 return 0;
11532}
11533_ACEOF
11534if ac_fn_c_try_link "$LINENO"; then :
11535 ac_cv_lib_bsd_flock=yes
11536else
11537 ac_cv_lib_bsd_flock=no
11538fi
11539rm -f core conftest.err conftest.$ac_objext \
11540 conftest$ac_exeext conftest.$ac_ext
11541LIBS=$ac_check_lib_save_LIBS
11542fi
11543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11544$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011545if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011546 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011547
11548
11549$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11550
11551
11552fi
11553
11554
11555fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011556done
11557
Antoine Pitroua3000072010-09-07 14:52:42 +000011558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11561$as_echo_n "checking for getpagesize... " >&6; }
11562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011564
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011565#include <unistd.h>
11566
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011567int
11568main ()
11569{
11570void* p = getpagesize
11571 ;
11572 return 0;
11573}
11574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011578
Matthias Kloseb159a552010-04-25 21:00:44 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011580$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011584
11585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587
Victor Stinner984890f2011-11-24 13:53:38 +010011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11589$as_echo_n "checking for broken unsetenv... " >&6; }
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591/* end confdefs.h. */
11592
11593#include <stdlib.h>
11594
11595int
11596main ()
11597{
11598int res = unsetenv("DUMMY")
11599 ;
11600 return 0;
11601}
11602_ACEOF
11603if ac_fn_c_try_compile "$LINENO"; then :
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
11606else
11607
11608$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11609
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11611$as_echo "yes" >&6; }
11612
11613fi
11614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011616for ac_prog in true
11617do
11618 # Extract the first word of "$ac_prog", so it can be a program name with args.
11619set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11621$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011624else
11625 if test -n "$TRUE"; then
11626 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11627else
11628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11629for as_dir in $PATH
11630do
11631 IFS=$as_save_IFS
11632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011635 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 $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 +000011637 break 2
11638 fi
11639done
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011642
11643fi
11644fi
11645TRUE=$ac_cv_prog_TRUE
11646if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11648$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011652fi
11653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011655 test -n "$TRUE" && break
11656done
11657test -n "$TRUE" || TRUE="/bin/true"
11658
11659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11661$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011662if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011664else
11665 ac_check_lib_save_LIBS=$LIBS
11666LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670/* Override any GCC internal prototype to avoid an error.
11671 Use char because int might match the return type of a GCC
11672 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673#ifdef __cplusplus
11674extern "C"
11675#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011677int
11678main ()
11679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011681 ;
11682 return 0;
11683}
11684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686 ac_cv_lib_c_inet_aton=yes
11687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011690rm -f core conftest.err conftest.$ac_objext \
11691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692LIBS=$ac_check_lib_save_LIBS
11693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11695$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011697 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11700$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011701if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703else
11704 ac_check_lib_save_LIBS=$LIBS
11705LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011707/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709/* Override any GCC internal prototype to avoid an error.
11710 Use char because int might match the return type of a GCC
11711 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011712#ifdef __cplusplus
11713extern "C"
11714#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011716int
11717main ()
11718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011720 ;
11721 return 0;
11722}
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011725 ac_cv_lib_resolv_inet_aton=yes
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011729rm -f core conftest.err conftest.$ac_objext \
11730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731LIBS=$ac_check_lib_save_LIBS
11732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11734$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011735if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736 cat >>confdefs.h <<_ACEOF
11737#define HAVE_LIBRESOLV 1
11738_ACEOF
11739
11740 LIBS="-lresolv $LIBS"
11741
11742fi
11743
11744
11745fi
11746
11747
Christian Heimesd0764e22007-12-04 15:00:33 +000011748# On Tru64, chflags seems to be present, but calling it will
11749# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11751$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011756 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011759/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011760
Christian Heimesd0764e22007-12-04 15:00:33 +000011761#include <sys/stat.h>
11762#include <unistd.h>
11763int main(int argc, char*argv[])
11764{
11765 if(chflags(argv[0], 0) != 0)
11766 return 1;
11767 return 0;
11768}
Ned Deily3eb67d52011-06-28 00:00:28 -070011769
Christian Heimesd0764e22007-12-04 15:00:33 +000011770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011778fi
11779
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11783$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011784if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011786if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011787 ac_cv_have_chflags="yes"
11788else
11789 ac_cv_have_chflags="no"
11790fi
11791
11792fi
11793if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011796
11797fi
11798
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11800$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011805 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011808/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011809
Christian Heimesd0764e22007-12-04 15:00:33 +000011810#include <sys/stat.h>
11811#include <unistd.h>
11812int main(int argc, char*argv[])
11813{
11814 if(lchflags(argv[0], 0) != 0)
11815 return 1;
11816 return 0;
11817}
Ned Deily3eb67d52011-06-28 00:00:28 -070011818
Christian Heimesd0764e22007-12-04 15:00:33 +000011819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011821 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11826 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011827fi
11828
11829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11832$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011833if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011836 ac_cv_have_lchflags="yes"
11837else
11838 ac_cv_have_lchflags="no"
11839fi
11840
11841fi
11842if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011845
11846fi
11847
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011848case $ac_sys_system/$ac_sys_release in
11849Darwin/*)
11850 _CUR_CFLAGS="${CFLAGS}"
11851 _CUR_LDFLAGS="${LDFLAGS}"
11852 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11853 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11854 ;;
11855esac
11856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11858$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011859if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011861else
11862 ac_check_lib_save_LIBS=$LIBS
11863LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011865/* end confdefs.h. */
11866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867/* Override any GCC internal prototype to avoid an error.
11868 Use char because int might match the return type of a GCC
11869 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011870#ifdef __cplusplus
11871extern "C"
11872#endif
11873char inflateCopy ();
11874int
11875main ()
11876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011883 ac_cv_lib_z_inflateCopy=yes
11884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887rm -f core conftest.err conftest.$ac_objext \
11888 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011889LIBS=$ac_check_lib_save_LIBS
11890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11892$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011893if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011896
11897fi
11898
11899
11900case $ac_sys_system/$ac_sys_release in
11901Darwin/*)
11902 CFLAGS="${_CUR_CFLAGS}"
11903 LDFLAGS="${_CUR_LDFLAGS}"
11904 ;;
11905esac
11906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11908$as_echo_n "checking for hstrerror... " >&6; }
11909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011911
Martin v. Löwise9416172003-05-03 10:12:45 +000011912#include <netdb.h>
11913
Martin v. Löwise9416172003-05-03 10:12:45 +000011914int
11915main ()
11916{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011917void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011918 ;
11919 return 0;
11920}
11921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011925
Matthias Kloseb159a552010-04-25 21:00:44 +000011926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011927$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011931
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core conftest.err conftest.$ac_objext \
11934 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11937$as_echo_n "checking for inet_aton... " >&6; }
11938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011939/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011940
Martin v. Löwis86d66262006-02-17 08:40:11 +000011941#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011942#include <sys/socket.h>
11943#include <netinet/in.h>
11944#include <arpa/inet.h>
11945
Martin v. Löwise9416172003-05-03 10:12:45 +000011946int
11947main ()
11948{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011949void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011950 ;
11951 return 0;
11952}
11953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
Matthias Kloseb159a552010-04-25 21:00:44 +000011958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011959$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
11964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011965rm -f core conftest.err conftest.$ac_objext \
11966 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11969$as_echo_n "checking for inet_pton... " >&6; }
11970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011971/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011972
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011973#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011974#include <sys/socket.h>
11975#include <netinet/in.h>
11976#include <arpa/inet.h>
11977
Martin v. Löwise9416172003-05-03 10:12:45 +000011978int
11979main ()
11980{
11981void* p = inet_pton
11982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
Matthias Kloseb159a552010-04-25 21:00:44 +000011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011995
11996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011998
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011999# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12001$as_echo_n "checking for setgroups... " >&6; }
12002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012003/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012004
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012005#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012006#ifdef HAVE_GRP_H
12007#include <grp.h>
12008#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012009
Martin v. Löwisd5843682002-11-21 20:41:28 +000012010int
12011main ()
12012{
12013void* p = setgroups
12014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012021
Matthias Kloseb159a552010-04-25 21:00:44 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012027
12028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012031# check for openpty and forkpty
12032
12033for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012034do :
12035 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012036if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012039_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12043$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012046else
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052/* Override any GCC internal prototype to avoid an error.
12053 Use char because int might match the return type of a GCC
12054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012058char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012059int
12060main ()
12061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012074LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12077$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012080 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12083$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012086else
12087 ac_check_lib_save_LIBS=$LIBS
12088LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012090/* end confdefs.h. */
12091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092/* Override any GCC internal prototype to avoid an error.
12093 Use char because int might match the return type of a GCC
12094 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012095#ifdef __cplusplus
12096extern "C"
12097#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012098char openpty ();
12099int
12100main ()
12101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012102return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012108 ac_cv_lib_bsd_openpty=yes
12109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012112rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114LIBS=$ac_check_lib_save_LIBS
12115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12117$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012118if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012120 LIBS="$LIBS -lbsd"
12121fi
12122
12123
12124fi
12125
Fred Drake8cef4cf2000-06-28 16:40:38 +000012126
12127fi
12128done
12129
12130for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012131do :
12132 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012133if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012136_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137
Fred Drake8cef4cf2000-06-28 16:40:38 +000012138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12140$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143else
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149/* Override any GCC internal prototype to avoid an error.
12150 Use char because int might match the return type of a GCC
12151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012152#ifdef __cplusplus
12153extern "C"
12154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012155char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ;
12161 return 0;
12162}
12163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012169rm -f core conftest.err conftest.$ac_objext \
12170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012171LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12174$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12180$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012183else
12184 ac_check_lib_save_LIBS=$LIBS
12185LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187/* end confdefs.h. */
12188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189/* Override any GCC internal prototype to avoid an error.
12190 Use char because int might match the return type of a GCC
12191 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192#ifdef __cplusplus
12193extern "C"
12194#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012195char forkpty ();
12196int
12197main ()
12198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012200 ;
12201 return 0;
12202}
12203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205 ac_cv_lib_bsd_forkpty=yes
12206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012209rm -f core conftest.err conftest.$ac_objext \
12210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211LIBS=$ac_check_lib_save_LIBS
12212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12214$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012215if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217 LIBS="$LIBS -lbsd"
12218fi
12219
12220
12221fi
12222
Fred Drake8cef4cf2000-06-28 16:40:38 +000012223
12224fi
12225done
12226
Jack Jansendd19cf82001-12-06 22:36:17 +000012227
Christian Heimesb186d002008-03-18 15:15:01 +000012228# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012229for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012230do :
12231 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012234#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012235_ACEOF
12236
12237fi
12238done
12239
12240
Michael W. Hudson54241132001-12-07 15:38:26 +000012241# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012243do :
12244 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12245ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012246if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012249_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012250
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252done
12253
Michael W. Hudson54241132001-12-07 15:38:26 +000012254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012255ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012256if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012257 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012258
Martin v. Löwis1142de32002-03-29 16:28:31 +000012259else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012261 *" dup2.$ac_objext "* ) ;;
12262 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012264esac
12265
Martin v. Löwis1142de32002-03-29 16:28:31 +000012266fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012267
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012268ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012270 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12271
12272else
12273 case " $LIBOBJS " in
12274 *" strdup.$ac_objext "* ) ;;
12275 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12276 ;;
12277esac
12278
12279fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012280
12281
12282for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012283do :
12284 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012303
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012306
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012308done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012309
Jack Jansen150753c2003-03-29 22:07:47 +000012310for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012311do :
12312 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012313if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012319#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012320int
12321main ()
12322{
12323setpgrp(0,0);
12324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012331
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012334
12335fi
12336done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012337
Thomas Wouters3a584202000-08-05 23:28:51 +000012338for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012339do :
12340 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012348int
12349main ()
12350{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356if ac_fn_c_try_compile "$LINENO"; then :
12357
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358else
Skip Montanaro6dead952003-09-25 14:50:04 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012365
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012367done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368
Michael W. Hudson54241132001-12-07 15:38:26 +000012369
Victor Stinnere0be4232011-10-25 13:06:09 +020012370for ac_func in clock_gettime
12371do :
12372 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12373if test "x$ac_cv_func_clock_gettime" = xyes; then :
12374 cat >>confdefs.h <<_ACEOF
12375#define HAVE_CLOCK_GETTIME 1
12376_ACEOF
12377
12378else
12379
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12381$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12382if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12383 $as_echo_n "(cached) " >&6
12384else
12385 ac_check_lib_save_LIBS=$LIBS
12386LIBS="-lrt $LIBS"
12387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388/* end confdefs.h. */
12389
12390/* Override any GCC internal prototype to avoid an error.
12391 Use char because int might match the return type of a GCC
12392 builtin and then its argument prototype would still apply. */
12393#ifdef __cplusplus
12394extern "C"
12395#endif
12396char clock_gettime ();
12397int
12398main ()
12399{
12400return clock_gettime ();
12401 ;
12402 return 0;
12403}
12404_ACEOF
12405if ac_fn_c_try_link "$LINENO"; then :
12406 ac_cv_lib_rt_clock_gettime=yes
12407else
12408 ac_cv_lib_rt_clock_gettime=no
12409fi
12410rm -f core conftest.err conftest.$ac_objext \
12411 conftest$ac_exeext conftest.$ac_ext
12412LIBS=$ac_check_lib_save_LIBS
12413fi
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12415$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12416if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12417
Victor Stinner7efb8332014-08-29 15:41:08 +020012418 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012419 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12420
12421
12422$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12423
12424
12425fi
12426
12427
12428fi
12429done
12430
12431
12432for ac_func in clock_getres
12433do :
12434 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12435if test "x$ac_cv_func_clock_getres" = xyes; then :
12436 cat >>confdefs.h <<_ACEOF
12437#define HAVE_CLOCK_GETRES 1
12438_ACEOF
12439
12440else
12441
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12443$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12444if ${ac_cv_lib_rt_clock_getres+:} false; then :
12445 $as_echo_n "(cached) " >&6
12446else
12447 ac_check_lib_save_LIBS=$LIBS
12448LIBS="-lrt $LIBS"
12449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450/* end confdefs.h. */
12451
12452/* Override any GCC internal prototype to avoid an error.
12453 Use char because int might match the return type of a GCC
12454 builtin and then its argument prototype would still apply. */
12455#ifdef __cplusplus
12456extern "C"
12457#endif
12458char clock_getres ();
12459int
12460main ()
12461{
12462return clock_getres ();
12463 ;
12464 return 0;
12465}
12466_ACEOF
12467if ac_fn_c_try_link "$LINENO"; then :
12468 ac_cv_lib_rt_clock_getres=yes
12469else
12470 ac_cv_lib_rt_clock_getres=no
12471fi
12472rm -f core conftest.err conftest.$ac_objext \
12473 conftest$ac_exeext conftest.$ac_ext
12474LIBS=$ac_check_lib_save_LIBS
12475fi
12476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12477$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12478if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12479
12480 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12481
12482
12483fi
12484
12485
12486fi
12487done
12488
12489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12491$as_echo_n "checking for major... " >&6; }
12492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012494
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012495#if defined(MAJOR_IN_MKDEV)
12496#include <sys/mkdev.h>
12497#elif defined(MAJOR_IN_SYSMACROS)
12498#include <sys/sysmacros.h>
12499#else
12500#include <sys/types.h>
12501#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012502
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012503int
12504main ()
12505{
12506
12507 makedev(major(0),minor(0));
12508
12509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012514
12515
Matthias Kloseb9621712010-04-24 17:59:49 +000012516$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12519$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012520
12521else
Skip Montanaro6dead952003-09-25 14:50:04 +000012522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012525
12526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012527rm -f core conftest.err conftest.$ac_objext \
12528 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012529
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012530# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012531# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12533$as_echo_n "checking for getaddrinfo... " >&6; }
12534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012536
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012537#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012538#include <sys/socket.h>
12539#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012540#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542int
12543main ()
12544{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012545getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 ;
12547 return 0;
12548}
12549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012550if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012551 have_getaddrinfo=yes
12552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012555rm -f core conftest.err conftest.$ac_objext \
12556 conftest$ac_exeext conftest.$ac_ext
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12558$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012559if test $have_getaddrinfo = yes
12560then
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12562$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012563 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012567
12568if test "${enable_ipv6+set}" = set; then
12569 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12570else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012571 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012572fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012576
Stefan Krah19c21392012-11-22 23:47:32 +010012577#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012578#include <sys/types.h>
12579#include <netdb.h>
12580#include <string.h>
12581#include <sys/socket.h>
12582#include <netinet/in.h>
12583
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012584int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012585{
12586 int passive, gaierr, inet4 = 0, inet6 = 0;
12587 struct addrinfo hints, *ai, *aitop;
12588 char straddr[INET6_ADDRSTRLEN], strport[16];
12589
12590 for (passive = 0; passive <= 1; passive++) {
12591 memset(&hints, 0, sizeof(hints));
12592 hints.ai_family = AF_UNSPEC;
12593 hints.ai_flags = passive ? AI_PASSIVE : 0;
12594 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012595 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12597 (void)gai_strerror(gaierr);
12598 goto bad;
12599 }
12600 for (ai = aitop; ai; ai = ai->ai_next) {
12601 if (ai->ai_addr == NULL ||
12602 ai->ai_addrlen == 0 ||
12603 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12604 straddr, sizeof(straddr), strport, sizeof(strport),
12605 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12606 goto bad;
12607 }
12608 switch (ai->ai_family) {
12609 case AF_INET:
12610 if (strcmp(strport, "54321") != 0) {
12611 goto bad;
12612 }
12613 if (passive) {
12614 if (strcmp(straddr, "0.0.0.0") != 0) {
12615 goto bad;
12616 }
12617 } else {
12618 if (strcmp(straddr, "127.0.0.1") != 0) {
12619 goto bad;
12620 }
12621 }
12622 inet4++;
12623 break;
12624 case AF_INET6:
12625 if (strcmp(strport, "54321") != 0) {
12626 goto bad;
12627 }
12628 if (passive) {
12629 if (strcmp(straddr, "::") != 0) {
12630 goto bad;
12631 }
12632 } else {
12633 if (strcmp(straddr, "::1") != 0) {
12634 goto bad;
12635 }
12636 }
12637 inet6++;
12638 break;
12639 case AF_UNSPEC:
12640 goto bad;
12641 break;
12642 default:
12643 /* another family support? */
12644 break;
12645 }
12646 }
12647 }
12648
12649 if (!(inet4 == 0 || inet4 == 2))
12650 goto bad;
12651 if (!(inet6 == 0 || inet6 == 2))
12652 goto bad;
12653
12654 if (aitop)
12655 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012656 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012657
12658 bad:
12659 if (aitop)
12660 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012661 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662}
12663
Martin v. Löwis11437992002-04-12 09:54:03 +000012664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012666 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012674fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012675
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12679$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12680
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012681if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012682then
12683 if test $ipv6 = yes
12684 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012685 echo 'Fatal: You must get working getaddrinfo() function.'
12686 echo ' or you can specify "--disable-ipv6"'.
12687 exit 1
12688 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012689else
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012692
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012694
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012695for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012696do :
12697 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012698if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012701_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012702
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012703fi
12704done
12705
Michael W. Hudson54241132001-12-07 15:38:26 +000012706
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12709$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012710if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712else
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715#include <sys/types.h>
12716#include <sys/time.h>
12717#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Martin v. Löwis11437992002-04-12 09:54:03 +000012719int
12720main ()
12721{
12722if ((struct tm *) 0)
12723return 0;
12724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12736$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012737if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740
12741fi
12742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12744$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012745if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747else
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012749/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012750#include <sys/types.h>
12751#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Martin v. Löwis11437992002-04-12 09:54:03 +000012753int
12754main ()
12755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756struct tm tm;
12757 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ;
12760 return 0;
12761}
12762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012763if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764 ac_cv_struct_tm=time.h
12765else
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12771$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012772if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775
12776fi
12777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778ac_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 +000012779#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781"
Victor Stinnere0be4232011-10-25 13:06:09 +020012782if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
12784cat >>confdefs.h <<_ACEOF
12785#define HAVE_STRUCT_TM_TM_ZONE 1
12786_ACEOF
12787
12788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794
12795else
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12797"
Victor Stinnere0be4232011-10-25 13:06:09 +020012798if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802fi
12803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806_ACEOF
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12809$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012810if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012815#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816#if !HAVE_DECL_TZNAME
12817extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820int
12821main ()
12822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ;
12825 return 0;
12826}
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012829 ac_cv_var_tzname=yes
12830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012833rm -f core conftest.err conftest.$ac_objext \
12834 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12837$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012838 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842 fi
12843fi
12844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845ac_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 +020012846if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
12848cat >>confdefs.h <<_ACEOF
12849#define HAVE_STRUCT_STAT_ST_RDEV 1
12850_ACEOF
12851
12852
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012853fi
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855ac_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 +020012856if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858cat >>confdefs.h <<_ACEOF
12859#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12860_ACEOF
12861
12862
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012863fi
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865ac_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 +020012866if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012867
12868cat >>confdefs.h <<_ACEOF
12869#define HAVE_STRUCT_STAT_ST_FLAGS 1
12870_ACEOF
12871
12872
12873fi
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875ac_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 +020012876if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012877
12878cat >>confdefs.h <<_ACEOF
12879#define HAVE_STRUCT_STAT_ST_GEN 1
12880_ACEOF
12881
12882
12883fi
12884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885ac_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 +020012886if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012887
12888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12890_ACEOF
12891
12892
12893fi
12894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895ac_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 +020012896if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898cat >>confdefs.h <<_ACEOF
12899#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12900_ACEOF
12901
12902
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012903fi
12904
Stefan Krah267b6392016-04-26 01:09:18 +020012905ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12906 #include <sys/types.h>
12907 #include <pwd.h>
12908
12909"
12910if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12911
12912cat >>confdefs.h <<_ACEOF
12913#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12914_ACEOF
12915
12916
12917fi
12918ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12919 #include <sys/types.h>
12920 #include <pwd.h>
12921
12922"
12923if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12924
12925cat >>confdefs.h <<_ACEOF
12926#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12927_ACEOF
12928
12929
12930fi
12931
Michael W. Hudson54241132001-12-07 15:38:26 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12934$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937else
Matthias Kloseb159a552010-04-25 21:00:44 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012940/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012941#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012950if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951 ac_cv_header_time_altzone=yes
12952else
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 ac_cv_header_time_altzone=no
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 Kloseb159a552010-04-25 21:00:44 +000012956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957fi
12958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12960$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964
12965fi
12966
Guido van Rossumda88dad1995-01-26 00:46:29 +000012967was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12969$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012972
12973#include <sys/types.h>
12974#include <sys/select.h>
12975#include <sys/time.h>
12976
Martin v. Löwis11437992002-04-12 09:54:03 +000012977int
12978main ()
12979{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980;
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ;
12982 return 0;
12983}
12984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
12987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012990 was_it_defined=yes
12991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12995$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12998$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012999if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001else
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013003/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013004#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013005int
13006main ()
13007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014 ac_cv_struct_addrinfo=yes
13015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13019fi
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13022$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026
13027fi
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13030$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013031if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013035/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036
13037# include <sys/types.h>
13038# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013039int
13040main ()
13041{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048 ac_cv_struct_sockaddr_storage=yes
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_struct_sockaddr_storage=no
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
13053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13056$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060
13061fi
13062
Guido van Rossum627b2d71993-12-24 10:39:16 +000013063# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13066$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013067if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013073int
13074main ()
13075{
13076static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013077test_array [0] = 0;
13078return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013079
13080 ;
13081 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013082}
Martin v. Löwis11437992002-04-12 09:54:03 +000013083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013085 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13092$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013093if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095
13096fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13099$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013100if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106int
13107main ()
13108{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013111 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013113 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115 char const *const *pcpcc;
13116 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 /* NEC SVR4.0.2 mips cc rejects this. */
13118 struct point {int x, y;};
13119 static struct point const zero = {0,0};
13120 /* AIX XL C 1.02.0.0 rejects this.
13121 It does not let you subtract one const X* pointer from another in
13122 an arm of an if-expression whose if-part is not a constant
13123 expression */
13124 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127 ++pcpcc;
13128 ppc = (char**) pcpcc;
13129 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013130 { /* SCO 3.2v4 cc rejects this sort of thing. */
13131 char tx;
13132 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 }
13138 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13139 int x[] = {25, 17};
13140 const int *foo = &x[0];
13141 ++foo;
13142 }
13143 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13144 typedef const int *iptr;
13145 iptr p = 0;
13146 ++p;
13147 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013148 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013150 struct s { int j; const int *ap[3]; } bx;
13151 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 }
13153 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13154 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013155 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013158#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 ;
13161 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013162}
Martin v. Löwis11437992002-04-12 09:54:03 +000013163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013165 ac_cv_c_const=yes
13166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13172$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176
13177fi
13178
Michael W. Hudson54241132001-12-07 15:38:26 +000013179
Guido van Rossumda88dad1995-01-26 00:46:29 +000013180works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13182$as_echo_n "checking for working volatile... " >&6; }
13183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013184/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013185
Martin v. Löwis11437992002-04-12 09:54:03 +000013186int
13187main ()
13188{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013189volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 ;
13191 return 0;
13192}
13193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013194if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013195 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013196else
Skip Montanaro6dead952003-09-25 14:50:04 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013200
Guido van Rossum627b2d71993-12-24 10:39:16 +000013201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13204$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013205
Guido van Rossumda88dad1995-01-26 00:46:29 +000013206works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13208$as_echo_n "checking for working signed char... " >&6; }
13209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013210/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212int
13213main ()
13214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 ;
13217 return 0;
13218}
13219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013220if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013221 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013222else
Skip Montanaro6dead952003-09-25 14:50:04 +000013223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013226
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13230$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
Guido van Rossumda88dad1995-01-26 00:46:29 +000013232have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13234$as_echo_n "checking for prototypes... " >&6; }
13235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013237int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013238int
13239main ()
13240{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Matthias Kloseb159a552010-04-25 21:00:44 +000013250 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13254$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255
Guido van Rossumda88dad1995-01-26 00:46:29 +000013256works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13258$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013260/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013261
13262#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013263int foo(int x, ...) {
13264 va_list va;
13265 va_start(va, x);
13266 va_arg(va, int);
13267 va_arg(va, char *);
13268 va_arg(va, double);
13269 return 0;
13270}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013271
Martin v. Löwis11437992002-04-12 09:54:03 +000013272int
13273main ()
13274{
Guido van Rossum90eea071996-08-30 20:58:57 +000013275return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 ;
13277 return 0;
13278}
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013285 works=yes
13286
Guido van Rossum627b2d71993-12-24 10:39:16 +000013287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13290$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291
Martin v. Löwisd6320502004-08-12 13:45:08 +000013292# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13294$as_echo_n "checking for socketpair... " >&6; }
13295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013296/* end confdefs.h. */
13297
13298#include <sys/types.h>
13299#include <sys/socket.h>
13300
13301int
13302main ()
13303{
13304void *x=socketpair
13305 ;
13306 return 0;
13307}
13308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013312
Matthias Kloseb159a552010-04-25 21:00:44 +000013313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013314$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13317$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013318
13319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013321
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13324$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013326/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327#include <sys/types.h>
13328#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332struct sockaddr x;
13333x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 ;
13335 return 0;
13336}
13337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013338if ac_fn_c_try_compile "$LINENO"; then :
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13340$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013343
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13346$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013347
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013350
Guido van Rossumda88dad1995-01-26 00:46:29 +000013351va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13353$as_echo_n "checking whether va_list is an array... " >&6; }
13354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356
13357#ifdef HAVE_STDARG_PROTOTYPES
13358#include <stdarg.h>
13359#else
13360#include <varargs.h>
13361#endif
13362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363int
13364main ()
13365{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013366va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
13372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373else
Skip Montanaro6dead952003-09-25 14:50:04 +000013374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Guido van Rossumda88dad1995-01-26 00:46:29 +000013378 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13383$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013385# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
13387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013389if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13394$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013395 OLD_CFLAGS=$CFLAGS
13396 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013399
13400# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013405
13406 char *name;
13407 struct hostent *he, *res;
13408 char buffer[2048];
13409 int buflen = 2048;
13410 int h_errnop;
13411
13412 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13426$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428else
Skip Montanaro6dead952003-09-25 14:50:04 +000013429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13433$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013437# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013442
13443 char *name;
13444 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013445 char buffer[2048];
13446 int buflen = 2048;
13447 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013448
Matthias Kloseb159a552010-04-25 21:00:44 +000013449 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
13451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb159a552010-04-25 21:00:44 +000013460$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13463$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013465else
Skip Montanaro6dead952003-09-25 14:50:04 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13468$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13470$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13472/* end confdefs.h. */
13473
13474# include <netdb.h>
13475
13476int
13477main ()
13478{
13479
13480 char *name;
13481 struct hostent *he;
13482 struct hostent_data data;
13483
13484 (void) gethostbyname_r(name, he, &data);
13485
13486 ;
13487 return 0;
13488}
13489_ACEOF
13490if ac_fn_c_try_compile "$LINENO"; then :
13491
13492 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13493
13494
13495$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13496
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13498$as_echo "yes" >&6; }
13499
13500else
13501
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013513 CFLAGS=$OLD_CFLAGS
13514
13515else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 for ac_func in gethostbyname
13518do :
13519 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013520if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013523_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013524
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013525fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013526done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527
Michael W. Hudson54241132001-12-07 15:38:26 +000013528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529fi
13530
Michael W. Hudson54241132001-12-07 15:38:26 +000013531
13532
13533
13534
13535
13536
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537# checks for system services
13538# (none yet)
13539
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013541ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013542if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013543
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13546$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013547if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549else
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013551LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555/* Override any GCC internal prototype to avoid an error.
13556 Use char because int might match the return type of a GCC
13557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013558#ifdef __cplusplus
13559extern "C"
13560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013561char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013562int
13563main ()
13564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ;
13567 return 0;
13568}
13569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013575rm -f core conftest.err conftest.$ac_objext \
13576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13580$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013581if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 cat >>confdefs.h <<_ACEOF
13583#define HAVE_LIBIEEE 1
13584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013586 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587
Guido van Rossum627b2d71993-12-24 10:39:16 +000013588fi
13589
Michael W. Hudson54241132001-12-07 15:38:26 +000013590
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013591fi
13592
Michael W. Hudson54241132001-12-07 15:38:26 +000013593
Guido van Rossum7f253911997-05-09 02:42:48 +000013594# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13596$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013601if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013602then
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13607$as_echo "yes" >&6; }
13608else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13609$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013610fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614fi
13615
Guido van Rossum7f253911997-05-09 02:42:48 +000013616
Guido van Rossum7f43da71994-08-01 12:15:30 +000013617# check for --with-libm=...
13618
Guido van Rossum563e7081996-09-10 18:20:48 +000013619case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013620Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013621*) LIBM=-lm
13622esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13624$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013627if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013629if test "$withval" = no
13630then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13632$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013633elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013634then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13636$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013637else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013638fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13641$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642fi
13643
Guido van Rossum7f43da71994-08-01 12:15:30 +000013644
13645# check for --with-libc=...
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13648$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013653if test "$withval" = no
13654then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13656$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013657elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013658then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13660$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013661else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013662fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013663else
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13665$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666fi
13667
Guido van Rossum7f43da71994-08-01 12:15:30 +000013668
Stefan Krah1919b7e2012-03-21 18:25:23 +010013669# **************************************
13670# * Check for gcc x64 inline assembler *
13671# **************************************
13672
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13674$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676/* end confdefs.h. */
13677
13678int
13679main ()
13680{
13681
13682 __asm__ __volatile__ ("movq %rcx, %rax");
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013688if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013689 have_gcc_asm_for_x64=yes
13690else
13691 have_gcc_asm_for_x64=no
13692fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013693rm -f core conftest.err conftest.$ac_objext \
13694 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13696$as_echo "$have_gcc_asm_for_x64" >&6; }
13697if test "$have_gcc_asm_for_x64" = yes
13698then
13699
13700$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13701
13702fi
13703
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704# **************************************************
13705# * Check for various properties of floating point *
13706# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13709$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013710if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013712else
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715 ac_cv_little_endian_double=no
13716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718/* end confdefs.h. */
13719
13720#include <string.h>
13721int main() {
13722 double x = 9006104071832581.0;
13723 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13724 return 0;
13725 else
13726 return 1;
13727}
13728
13729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013731 ac_cv_little_endian_double=yes
13732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737fi
13738
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013739fi
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13742$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743if test "$ac_cv_little_endian_double" = yes
13744then
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013747
13748fi
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13751$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013752if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013754else
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757 ac_cv_big_endian_double=no
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013760/* end confdefs.h. */
13761
13762#include <string.h>
13763int main() {
13764 double x = 9006104071832581.0;
13765 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13766 return 0;
13767 else
13768 return 1;
13769}
13770
13771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773 ac_cv_big_endian_double=yes
13774else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779fi
13780
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781fi
13782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13784$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785if test "$ac_cv_big_endian_double" = yes
13786then
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789
13790fi
13791
13792# Some ARM platforms use a mixed-endian representation for doubles.
13793# While Python doesn't currently have full support for these platforms
13794# (see e.g., issue 1762561), we can at least make sure that float <-> string
13795# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13797$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013798if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800else
13801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803 ac_cv_mixed_endian_double=no
13804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806/* end confdefs.h. */
13807
13808#include <string.h>
13809int main() {
13810 double x = 9006104071832581.0;
13811 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13812 return 0;
13813 else
13814 return 1;
13815}
13816
13817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013818if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819 ac_cv_mixed_endian_double=yes
13820else
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13824 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825fi
13826
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827fi
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13830$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831if test "$ac_cv_mixed_endian_double" = yes
13832then
13833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013835
13836fi
13837
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013838# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013839# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013840# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013841# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013842# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013843# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013844
13845# This inline assembler syntax may also work for suncc and icc,
13846# so we try it on all platforms.
13847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13849$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013851/* end confdefs.h. */
13852
13853int
13854main ()
13855{
13856
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013857 unsigned short cw;
13858 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13859 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860
13861 ;
13862 return 0;
13863}
13864_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013865if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866 have_gcc_asm_for_x87=yes
13867else
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013870rm -f core conftest.err conftest.$ac_objext \
13871 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13873$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013874if test "$have_gcc_asm_for_x87" = yes
13875then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13882$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13884/* end confdefs.h. */
13885
13886int
13887main ()
13888{
13889
13890 unsigned int fpcr;
13891 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13892 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13893
13894 ;
13895 return 0;
13896}
13897_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013898if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013899 have_gcc_asm_for_mc68881=yes
13900else
13901 have_gcc_asm_for_mc68881=no
13902fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013903rm -f core conftest.err conftest.$ac_objext \
13904 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13906$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13907if test "$have_gcc_asm_for_mc68881" = yes
13908then
13909
13910$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13911
13912fi
13913
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013914# Detect whether system arithmetic is subject to x87-style double
13915# rounding issues. The result of this test has little meaning on non
13916# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13917# mode is round-to-nearest and double rounding issues are present, and
13918# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13920$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921# $BASECFLAGS may affect the result
13922ac_save_cc="$CC"
13923CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013924if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013925 ac_cv_x87_double_rounding=no
13926else
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013928/* end confdefs.h. */
13929
13930#include <stdlib.h>
13931#include <math.h>
13932int main() {
13933 volatile double x, y, z;
13934 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13935 x = 0.99999999999999989; /* 1-2**-53 */
13936 y = 1./x;
13937 if (y != 1.)
13938 exit(0);
13939 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13940 x = 1e16;
13941 y = 2.99999;
13942 z = x + y;
13943 if (z != 1e16+4.)
13944 exit(0);
13945 /* both tests show evidence of double rounding */
13946 exit(1);
13947}
13948
13949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013950if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013951 ac_cv_x87_double_rounding=no
13952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013957fi
13958
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13961$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013962if test "$ac_cv_x87_double_rounding" = yes
13963then
13964
Matthias Kloseb9621712010-04-24 17:59:49 +000013965$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013966
13967fi
13968
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969# ************************************
13970# * Check for mathematical functions *
13971# ************************************
13972
13973LIBS_SAVE=$LIBS
13974LIBS="$LIBS $LIBM"
13975
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013976for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13977do :
13978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013980if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013981 cat >>confdefs.h <<_ACEOF
13982#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13983_ACEOF
13984
13985fi
13986done
13987
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013988for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013989do :
13990 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13991ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013992if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013993 cat >>confdefs.h <<_ACEOF
13994#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13995_ACEOF
13996
13997fi
13998done
13999
14000ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14001"
Victor Stinnere0be4232011-10-25 13:06:09 +020014002if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014003 ac_have_decl=1
14004else
14005 ac_have_decl=0
14006fi
14007
14008cat >>confdefs.h <<_ACEOF
14009#define HAVE_DECL_ISINF $ac_have_decl
14010_ACEOF
14011ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14012"
Victor Stinnere0be4232011-10-25 13:06:09 +020014013if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014014 ac_have_decl=1
14015else
14016 ac_have_decl=0
14017fi
14018
14019cat >>confdefs.h <<_ACEOF
14020#define HAVE_DECL_ISNAN $ac_have_decl
14021_ACEOF
14022ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14023"
Victor Stinnere0be4232011-10-25 13:06:09 +020014024if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014025 ac_have_decl=1
14026else
14027 ac_have_decl=0
14028fi
14029
14030cat >>confdefs.h <<_ACEOF
14031#define HAVE_DECL_ISFINITE $ac_have_decl
14032_ACEOF
14033
14034
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014035# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14036# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14038$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014039if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014041else
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014044 ac_cv_tanh_preserves_zero_sign=no
14045else
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014047/* end confdefs.h. */
14048
14049#include <math.h>
14050#include <stdlib.h>
14051int main() {
14052 /* return 0 if either negative zeros don't exist
14053 on this platform or if negative zeros exist
14054 and tanh(-0.) == -0. */
14055 if (atan2(0., -1.) == atan2(-0., -1.) ||
14056 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14057 else exit(1);
14058}
14059
14060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014062 ac_cv_tanh_preserves_zero_sign=yes
14063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014068fi
14069
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014070fi
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14073$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014074if test "$ac_cv_tanh_preserves_zero_sign" = yes
14075then
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014078
14079fi
14080
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014081if test "$ac_cv_func_log1p" = yes
14082then
14083 # On some versions of AIX, log1p(-0.) returns 0. instead of
14084 # -0. See issue #9920.
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14086$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014087 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014088 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014089else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014090
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014091 if test "$cross_compiling" = yes; then :
14092 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014093else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14095/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097 #include <math.h>
14098 #include <stdlib.h>
14099 int main() {
14100 /* Fail if the signs of log1p(-0.) and -0. can be
14101 distinguished. */
14102 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14103 return 0;
14104 else
14105 return 1;
14106 }
14107
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014108_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014109if ac_fn_c_try_run "$LINENO"; then :
14110 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014111else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014112 ac_cv_log1p_drops_zero_sign=yes
14113fi
14114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014116fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014117
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014118fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014119
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14121$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14122fi
14123if test "$ac_cv_log1p_drops_zero_sign" = yes
14124then
14125
14126$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14127
14128fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014129
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014130LIBS=$LIBS_SAVE
14131
Mark Dickinsona614f042009-11-28 12:48:43 +000014132# For multiprocessing module, check that sem_open
14133# actually works. For FreeBSD versions <= 7.2,
14134# the kernel module that provides POSIX semaphores
14135# isn't loaded by default, so an attempt to call
14136# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14138$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014139if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014141else
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014143 ac_cv_posix_semaphores_enabled=yes
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014146/* end confdefs.h. */
14147
14148#include <unistd.h>
14149#include <fcntl.h>
14150#include <stdio.h>
14151#include <semaphore.h>
14152#include <sys/stat.h>
14153
14154int main(void) {
14155 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14156 if (a == SEM_FAILED) {
14157 perror("sem_open");
14158 return 1;
14159 }
14160 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014161 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014162 return 0;
14163}
14164
14165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014167 ac_cv_posix_semaphores_enabled=yes
14168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014173fi
14174
14175
Mark Dickinsona614f042009-11-28 12:48:43 +000014176fi
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14179$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014180if test $ac_cv_posix_semaphores_enabled = no
14181then
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014184
14185fi
14186
Mark Dickinson10683072009-04-18 21:18:19 +000014187# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14189$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014190if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014197/* end confdefs.h. */
14198
14199#include <unistd.h>
14200#include <fcntl.h>
14201#include <stdio.h>
14202#include <semaphore.h>
14203#include <sys/stat.h>
14204
14205int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014206 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014207 int count;
14208 int res;
14209 if(a==SEM_FAILED){
14210 perror("sem_open");
14211 return 1;
14212
14213 }
14214 res = sem_getvalue(a, &count);
14215 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014216 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014217 return res==-1 ? 1 : 0;
14218}
14219
Mark Dickinson10683072009-04-18 21:18:19 +000014220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014221if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014222 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014228fi
14229
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014231fi
14232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14234$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014235if test $ac_cv_broken_sem_getvalue = yes
14236then
14237
Matthias Kloseb9621712010-04-24 17:59:49 +000014238$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014239
14240fi
14241
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014242ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14243"
14244if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14245 ac_have_decl=1
14246else
14247 ac_have_decl=0
14248fi
14249
14250cat >>confdefs.h <<_ACEOF
14251#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14252_ACEOF
14253ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14254"
14255if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14256 ac_have_decl=1
14257else
14258 ac_have_decl=0
14259fi
14260
14261cat >>confdefs.h <<_ACEOF
14262#define HAVE_DECL_RTLD_NOW $ac_have_decl
14263_ACEOF
14264ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14265"
14266if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14267 ac_have_decl=1
14268else
14269 ac_have_decl=0
14270fi
14271
14272cat >>confdefs.h <<_ACEOF
14273#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14274_ACEOF
14275ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14276"
14277if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14278 ac_have_decl=1
14279else
14280 ac_have_decl=0
14281fi
14282
14283cat >>confdefs.h <<_ACEOF
14284#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14285_ACEOF
14286ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14287"
14288if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14289 ac_have_decl=1
14290else
14291 ac_have_decl=0
14292fi
14293
14294cat >>confdefs.h <<_ACEOF
14295#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14296_ACEOF
14297ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14298"
14299if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14300 ac_have_decl=1
14301else
14302 ac_have_decl=0
14303fi
14304
14305cat >>confdefs.h <<_ACEOF
14306#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14307_ACEOF
14308ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14309"
14310if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14311 ac_have_decl=1
14312else
14313 ac_have_decl=0
14314fi
14315
14316cat >>confdefs.h <<_ACEOF
14317#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14318_ACEOF
14319
14320
Mark Dickinsonbd792642009-03-18 20:06:12 +000014321# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14323$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014324# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014325if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014326 enableval=$enable_big_digits; case $enable_big_digits in
14327yes)
14328 enable_big_digits=30 ;;
14329no)
14330 enable_big_digits=15 ;;
1433115|30)
14332 ;;
14333*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014334 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 +000014335esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14337$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014338
14339cat >>confdefs.h <<_ACEOF
14340#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14341_ACEOF
14342
14343
14344else
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14346$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014347fi
14348
14349
Guido van Rossumef2255b2000-03-10 22:30:29 +000014350# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014351ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014352if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
14354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014357 wchar_h="yes"
14358
Guido van Rossumef2255b2000-03-10 22:30:29 +000014359else
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014361
14362fi
14363
Michael W. Hudson54241132001-12-07 15:38:26 +000014364
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014366# determine wchar_t size
14367if test "$wchar_h" = yes
14368then
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14372# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14374$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014375if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14379"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381else
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 if test "$ac_cv_type_wchar_t" = yes; then
14383 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014385as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014386See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 else
14388 ac_cv_sizeof_wchar_t=0
14389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14394$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395
14396
14397
Martin v. Löwis11437992002-04-12 09:54:03 +000014398cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014399#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014400_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014401
Michael W. Hudson54241132001-12-07 15:38:26 +000014402
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14406$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014407have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014409/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014410
14411#include <tcl.h>
14412#if TCL_UTF_MAX != 6
14413# error "NOT UCS4_TCL"
14414#endif
14415int
14416main ()
14417{
14418
14419 ;
14420 return 0;
14421}
14422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014424
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014427
14428 have_ucs4_tcl=yes
14429
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14433$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014434
Skip Montanaro6dead952003-09-25 14:50:04 +000014435# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014436if test "$wchar_h" = yes
14437then
14438 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14440$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014441 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014443else
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014446 ac_cv_wchar_t_signed=yes
14447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014449/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014450
14451 #include <wchar.h>
14452 int main()
14453 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014454 /* Success: exit code 0 */
14455 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014456 }
14457
14458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014460 ac_cv_wchar_t_signed=yes
14461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14465 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014466fi
14467
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014468fi
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14471$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472fi
14473
Georg Brandl52d168a2008-01-07 18:10:24 +000014474# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014475if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014476 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014477then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014478 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
Georg Brandl52d168a2008-01-07 18:10:24 +000014482else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014483 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014484fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14486$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014487
14488# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14490$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014491if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 ac_cv_c_bigendian=unknown
14495 # See if we're dealing with a universal compiler.
14496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14497/* end confdefs.h. */
14498#ifndef __APPLE_CC__
14499 not a universal capable compiler
14500 #endif
14501 typedef int dummy;
14502
Skip Montanaro6dead952003-09-25 14:50:04 +000014503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_compile "$LINENO"; then :
14505
14506 # Check for potential -arch flags. It is not universal unless
14507 # there are at least two -arch flags with different values.
14508 ac_arch=
14509 ac_prev=
14510 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14511 if test -n "$ac_prev"; then
14512 case $ac_word in
14513 i?86 | x86_64 | ppc | ppc64)
14514 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14515 ac_arch=$ac_word
14516 else
14517 ac_cv_c_bigendian=universal
14518 break
14519 fi
14520 ;;
14521 esac
14522 ac_prev=
14523 elif test "x$ac_word" = "x-arch"; then
14524 ac_prev=arch
14525 fi
14526 done
14527fi
14528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529 if test $ac_cv_c_bigendian = unknown; then
14530 # See if sys/param.h defines the BYTE_ORDER macro.
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014532/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014533#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535
Martin v. Löwis11437992002-04-12 09:54:03 +000014536int
14537main ()
14538{
Matthias Kloseb9621712010-04-24 17:59:49 +000014539#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14540 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14541 && LITTLE_ENDIAN)
14542 bogus endian macros
14543 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014544
14545 ;
14546 return 0;
14547}
14548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014550 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014552/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014553#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014555
Martin v. Löwis11437992002-04-12 09:54:03 +000014556int
14557main ()
14558{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014559#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 not big endian
14561 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
14563 ;
14564 return 0;
14565}
14566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014568 ac_cv_c_bigendian=yes
14569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014573fi
14574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14575 fi
14576 if test $ac_cv_c_bigendian = unknown; then
14577 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014579/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014580#include <limits.h>
14581
Martin v. Löwis11437992002-04-12 09:54:03 +000014582int
14583main ()
14584{
Matthias Kloseb9621712010-04-24 17:59:49 +000014585#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14586 bogus endian macros
14587 #endif
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 ;
14590 return 0;
14591}
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_compile "$LINENO"; then :
14594 # It does; now see whether it defined to _BIG_ENDIAN or not.
14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14596/* end confdefs.h. */
14597#include <limits.h>
14598
14599int
14600main ()
14601{
14602#ifndef _BIG_ENDIAN
14603 not big endian
14604 #endif
14605
14606 ;
14607 return 0;
14608}
14609_ACEOF
14610if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014612else
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616fi
14617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14618 fi
14619 if test $ac_cv_c_bigendian = unknown; then
14620 # Compile a test program.
14621 if test "$cross_compiling" = yes; then :
14622 # Try to guess by grepping values from an object file.
14623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14624/* end confdefs.h. */
14625short int ascii_mm[] =
14626 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14627 short int ascii_ii[] =
14628 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14629 int use_ascii (int i) {
14630 return ascii_mm[i] + ascii_ii[i];
14631 }
14632 short int ebcdic_ii[] =
14633 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14634 short int ebcdic_mm[] =
14635 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14636 int use_ebcdic (int i) {
14637 return ebcdic_mm[i] + ebcdic_ii[i];
14638 }
14639 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641int
14642main ()
14643{
14644return use_ascii (foo) == use_ebcdic (foo);
14645 ;
14646 return 0;
14647}
14648_ACEOF
14649if ac_fn_c_try_compile "$LINENO"; then :
14650 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14651 ac_cv_c_bigendian=yes
14652 fi
14653 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14654 if test "$ac_cv_c_bigendian" = unknown; then
14655 ac_cv_c_bigendian=no
14656 else
14657 # finding both strings is unlikely to happen, but who knows?
14658 ac_cv_c_bigendian=unknown
14659 fi
14660 fi
14661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014663else
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014665/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014667int
14668main ()
14669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 /* Are we little or big endian? From Harbison&Steele. */
14672 union
14673 {
14674 long int l;
14675 char c[sizeof (long int)];
14676 } u;
14677 u.l = 1;
14678 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
14680 ;
14681 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682}
Martin v. Löwis11437992002-04-12 09:54:03 +000014683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014685 ac_cv_c_bigendian=no
14686else
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14696$as_echo "$ac_cv_c_bigendian" >&6; }
14697 case $ac_cv_c_bigendian in #(
14698 yes)
14699 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14700;; #(
14701 no)
14702 ;; #(
14703 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 ;; #(
14708 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014709 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014710 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712
Michael W. Hudson54241132001-12-07 15:38:26 +000014713
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014714# ABI version string for Python extension modules. This appears between the
14715# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14716# from the following attributes which affect the ABI of this Python build (in
14717# this order):
14718#
14719# * The Python implementation (always 'cpython-' for us)
14720# * The major and minor version numbers
14721# * --with-pydebug (adds a 'd')
14722# * --with-pymalloc (adds a 'm')
14723# * --with-wide-unicode (adds a 'u')
14724#
14725# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014726# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14727# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014728
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14730$as_echo_n "checking ABIFLAGS... " >&6; }
14731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14732$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14734$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014735SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14737$as_echo "$SOABI" >&6; }
14738
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014739
14740case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014741 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014742 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14743 *)
14744 EXT_SUFFIX=${SHLIB_SUFFIX};;
14745esac
14746
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14748$as_echo_n "checking LDVERSION... " >&6; }
14749LDVERSION='$(VERSION)$(ABIFLAGS)'
14750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14751$as_echo "$LDVERSION" >&6; }
14752
doko@python.org87421192013-01-26 11:39:31 +010014753
doko@ubuntu.com55532312016-06-14 08:55:19 +020014754if test x$PLATFORM_TRIPLET = x; then
14755 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14756else
14757 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14758fi
doko@python.org87421192013-01-26 11:39:31 +010014759
14760
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014761# Check whether right shifting a negative integer extends the sign bit
14762# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14764$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014765if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014767else
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
Matthias Kloseb9621712010-04-24 17:59:49 +000014769if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014770 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014771else
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014774
14775int main()
14776{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014777 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014778}
14779
Martin v. Löwis11437992002-04-12 09:54:03 +000014780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014781if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014782 ac_cv_rshift_extends_sign=yes
14783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014788fi
14789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790fi
14791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14793$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014794if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014795then
Martin v. Löwis11437992002-04-12 09:54:03 +000014796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014798
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014799fi
14800
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014801# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14803$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014804if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014806else
Martin v. Löwis11437992002-04-12 09:54:03 +000014807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014809/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014811int
14812main ()
14813{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014814
14815 FILE *f = fopen("/dev/null", "r");
14816 flockfile(f);
14817 getc_unlocked(f);
14818 funlockfile(f);
14819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 ;
14821 return 0;
14822}
14823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014824if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014825 ac_cv_have_getc_unlocked=yes
14826else
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 ac_cv_have_getc_unlocked=no
14828fi
14829rm -f core conftest.err conftest.$ac_objext \
14830 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14834$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014835if test "$ac_cv_have_getc_unlocked" = yes
14836then
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014839
14840fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014841
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014842# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014843# save the value of LIBS so we don't actually link Python with readline
14844LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014845
Gregory P. Smith18820942008-09-07 06:24:49 +000014846# On some systems we need to link readline to a termcap compatible
14847# library. NOTE: Keep the precedence of listed libraries synchronised
14848# with setup.py.
14849py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14851$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014852for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014853 if test -z "$py_libtermcap"; then
14854 READLINE_LIBS="-lreadline"
14855 else
14856 READLINE_LIBS="-lreadline -l$py_libtermcap"
14857 fi
14858 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014860/* end confdefs.h. */
14861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862/* Override any GCC internal prototype to avoid an error.
14863 Use char because int might match the return type of a GCC
14864 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014865#ifdef __cplusplus
14866extern "C"
14867#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014868char readline ();
14869int
14870main ()
14871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014873 ;
14874 return 0;
14875}
14876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014877if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014878 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014880rm -f core conftest.err conftest.$ac_objext \
14881 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014882 if test $py_cv_lib_readline = yes; then
14883 break
14884 fi
14885done
14886# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14887#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014888if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14890$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14893$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014896
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014897fi
14898
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014899# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14901$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014902if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014904else
14905 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014906LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014908/* end confdefs.h. */
14909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910/* Override any GCC internal prototype to avoid an error.
14911 Use char because int might match the return type of a GCC
14912 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014913#ifdef __cplusplus
14914extern "C"
14915#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014916char rl_callback_handler_install ();
14917int
14918main ()
14919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014921 ;
14922 return 0;
14923}
14924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014925if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014926 ac_cv_lib_readline_rl_callback_handler_install=yes
14927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014930rm -f core conftest.err conftest.$ac_objext \
14931 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014932LIBS=$ac_check_lib_save_LIBS
14933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14935$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014939
14940fi
14941
14942
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014943# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014946#include <readline/readline.h>
14947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014948if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014949 have_readline=yes
14950else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014951 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014952
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014953fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014954rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014955if test $have_readline = yes
14956then
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014959#include <readline/readline.h>
14960
14961_ACEOF
14962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966
14967fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014968rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014971/* end confdefs.h. */
14972#include <readline/readline.h>
14973
14974_ACEOF
14975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014979
14980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014981rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014982
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983fi
14984
Martin v. Löwis0daad592001-09-30 21:09:59 +000014985# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14987$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014988if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014990else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014992LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996/* Override any GCC internal prototype to avoid an error.
14997 Use char because int might match the return type of a GCC
14998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014999#ifdef __cplusplus
15000extern "C"
15001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015002char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015003int
15004main ()
15005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ;
15008 return 0;
15009}
15010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015013else
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015016rm -f core conftest.err conftest.$ac_objext \
15017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015018LIBS=$ac_check_lib_save_LIBS
15019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15021$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015022if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015025
Martin v. Löwis0daad592001-09-30 21:09:59 +000015026fi
15027
Michael W. Hudson54241132001-12-07 15:38:26 +000015028
Thomas Wouters89d996e2007-09-08 17:39:28 +000015029# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15031$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015032if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015034else
15035 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015036LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015038/* end confdefs.h. */
15039
15040/* Override any GCC internal prototype to avoid an error.
15041 Use char because int might match the return type of a GCC
15042 builtin and then its argument prototype would still apply. */
15043#ifdef __cplusplus
15044extern "C"
15045#endif
15046char rl_completion_display_matches_hook ();
15047int
15048main ()
15049{
15050return rl_completion_display_matches_hook ();
15051 ;
15052 return 0;
15053}
15054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015055if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015056 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15057else
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015060rm -f core conftest.err conftest.$ac_objext \
15061 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015062LIBS=$ac_check_lib_save_LIBS
15063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15065$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015069
15070fi
15071
15072
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015073# also in 4.0, but not in editline
15074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15075$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15076if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15077 $as_echo_n "(cached) " >&6
15078else
15079 ac_check_lib_save_LIBS=$LIBS
15080LIBS="-lreadline $READLINE_LIBS $LIBS"
15081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
15083
15084/* Override any GCC internal prototype to avoid an error.
15085 Use char because int might match the return type of a GCC
15086 builtin and then its argument prototype would still apply. */
15087#ifdef __cplusplus
15088extern "C"
15089#endif
15090char rl_resize_terminal ();
15091int
15092main ()
15093{
15094return rl_resize_terminal ();
15095 ;
15096 return 0;
15097}
15098_ACEOF
15099if ac_fn_c_try_link "$LINENO"; then :
15100 ac_cv_lib_readline_rl_resize_terminal=yes
15101else
15102 ac_cv_lib_readline_rl_resize_terminal=no
15103fi
15104rm -f core conftest.err conftest.$ac_objext \
15105 conftest$ac_exeext conftest.$ac_ext
15106LIBS=$ac_check_lib_save_LIBS
15107fi
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15109$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15110if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15111
15112$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15113
15114fi
15115
15116
Martin v. Löwis0daad592001-09-30 21:09:59 +000015117# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15119$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015120if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015124LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128/* Override any GCC internal prototype to avoid an error.
15129 Use char because int might match the return type of a GCC
15130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015131#ifdef __cplusplus
15132extern "C"
15133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015134char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015135int
15136main ()
15137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ;
15140 return 0;
15141}
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core conftest.err conftest.$ac_objext \
15149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015150LIBS=$ac_check_lib_save_LIBS
15151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15153$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015154if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015157
Guido van Rossum353ae582001-07-10 16:45:32 +000015158fi
15159
Jack Jansendd19cf82001-12-06 22:36:17 +000015160
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163/* end confdefs.h. */
15164#include <readline/readline.h>
15165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015166if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015167 have_readline=yes
15168else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015170
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015172rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173if test $have_readline = yes
15174then
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176/* end confdefs.h. */
15177#include <readline/readline.h>
15178
15179_ACEOF
15180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184
15185fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015186rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187
15188fi
15189
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15191$as_echo_n "checking for append_history in -lreadline... " >&6; }
15192if ${ac_cv_lib_readline_append_history+:} false; then :
15193 $as_echo_n "(cached) " >&6
15194else
15195 ac_check_lib_save_LIBS=$LIBS
15196LIBS="-lreadline $READLINE_LIBS $LIBS"
15197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15198/* end confdefs.h. */
15199
15200/* Override any GCC internal prototype to avoid an error.
15201 Use char because int might match the return type of a GCC
15202 builtin and then its argument prototype would still apply. */
15203#ifdef __cplusplus
15204extern "C"
15205#endif
15206char append_history ();
15207int
15208main ()
15209{
15210return append_history ();
15211 ;
15212 return 0;
15213}
15214_ACEOF
15215if ac_fn_c_try_link "$LINENO"; then :
15216 ac_cv_lib_readline_append_history=yes
15217else
15218 ac_cv_lib_readline_append_history=no
15219fi
15220rm -f core conftest.err conftest.$ac_objext \
15221 conftest$ac_exeext conftest.$ac_ext
15222LIBS=$ac_check_lib_save_LIBS
15223fi
15224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15225$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15226if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15227
15228$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15229
15230fi
15231
15232
Martin v. Löwis82bca632006-02-10 20:49:30 +000015233# End of readline checks: restore LIBS
15234LIBS=$LIBS_no_readline
15235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15237$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015240else
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015243 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015246/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015247
15248int main()
15249{
15250 int val1 = nice(1);
15251 if (val1 != -1 && val1 == nice(2))
15252 exit(0);
15253 exit(1);
15254}
15255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015258 ac_cv_broken_nice=yes
15259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264fi
15265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266fi
15267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15269$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015270if test "$ac_cv_broken_nice" = yes
15271then
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015274
15275fi
15276
Matthias Kloseb9621712010-04-24 17:59:49 +000015277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15278$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015279if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015281else
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015283 ac_cv_broken_poll=no
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015286/* end confdefs.h. */
15287
15288#include <poll.h>
15289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015290int main()
15291{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015292 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015294
15295 close (42);
15296
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015297 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015299 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015303 return 1;
15304}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015305
15306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015307if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308 ac_cv_broken_poll=yes
15309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015316fi
15317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15319$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320if test "$ac_cv_broken_poll" = yes
15321then
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324
15325fi
15326
Brett Cannon43802422005-02-10 20:48:03 +000015327# 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 +000015328# (which is not required by ISO C or UNIX spec) and/or if we support
15329# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015330ac_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 +000015331#include <$ac_cv_struct_tm>
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333"
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015335
15336cat >>confdefs.h <<_ACEOF
15337#define HAVE_STRUCT_TM_TM_ZONE 1
15338_ACEOF
15339
15340
15341fi
15342
15343if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015346
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15349"
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354fi
15355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015357#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358_ACEOF
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15361$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015366/* end confdefs.h. */
15367#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368#if !HAVE_DECL_TZNAME
15369extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015370#endif
15371
15372int
15373main ()
15374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015376 ;
15377 return 0;
15378}
15379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015380if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015381 ac_cv_var_tzname=yes
15382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015385rm -f core conftest.err conftest.$ac_objext \
15386 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15389$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015390 if test $ac_cv_var_tzname = yes; then
15391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015393
15394 fi
15395fi
15396
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015397
Martin v. Löwis1d459062005-03-14 21:23:33 +000015398# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15400$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015401if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015403else
15404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015406 ac_cv_working_tzset=no
15407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015410
15411#include <stdlib.h>
15412#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015413#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015414
15415#if HAVE_TZNAME
15416extern char *tzname[];
15417#endif
15418
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015419int main()
15420{
Brett Cannon18367812003-09-19 00:59:16 +000015421 /* Note that we need to ensure that not only does tzset(3)
15422 do 'something' with localtime, but it works as documented
15423 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015424 This includes making sure that tzname is set properly if
15425 tm->tm_zone does not exist since it is the alternative way
15426 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015427
15428 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015429 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015430 */
15431
Martin v. Löwis1d459062005-03-14 21:23:33 +000015432 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015433 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15434
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015435 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015437 if (localtime(&groundhogday)->tm_hour != 0)
15438 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015439#if HAVE_TZNAME
15440 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15441 if (strcmp(tzname[0], "UTC") ||
15442 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15443 exit(1);
15444#endif
Brett Cannon18367812003-09-19 00:59:16 +000015445
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015446 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015447 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015448 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015449 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015450#if HAVE_TZNAME
15451 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15452 exit(1);
15453#endif
Brett Cannon18367812003-09-19 00:59:16 +000015454
15455 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15456 tzset();
15457 if (localtime(&groundhogday)->tm_hour != 11)
15458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015459#if HAVE_TZNAME
15460 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15461 exit(1);
15462#endif
15463
15464#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015465 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15466 exit(1);
15467 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15468 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015469#endif
Brett Cannon18367812003-09-19 00:59:16 +000015470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015471 exit(0);
15472}
15473
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015476 ac_cv_working_tzset=yes
15477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015482fi
15483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484fi
15485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15487$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015488if test "$ac_cv_working_tzset" = yes
15489then
15490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492
15493fi
15494
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015495# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15497$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015498if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015500else
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015502/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015503#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015504int
15505main ()
15506{
15507
15508struct stat st;
15509st.st_mtim.tv_nsec = 1;
15510
15511 ;
15512 return 0;
15513}
15514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015516 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15521fi
15522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15524$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015525if test "$ac_cv_stat_tv_nsec" = yes
15526then
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529
15530fi
15531
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015532# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15534$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015535if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015539/* end confdefs.h. */
15540#include <sys/stat.h>
15541int
15542main ()
15543{
15544
15545struct stat st;
15546st.st_mtimespec.tv_nsec = 1;
15547
15548 ;
15549 return 0;
15550}
15551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015553 ac_cv_stat_tv_nsec2=yes
15554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15558fi
15559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15561$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015562if test "$ac_cv_stat_tv_nsec2" = yes
15563then
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015566
15567fi
15568
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015569# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015570ac_save_cppflags="$CPPFLAGS"
15571CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015572
15573for ac_header in curses.h ncurses.h
15574do :
15575 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15576ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15578 cat >>confdefs.h <<_ACEOF
15579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15580_ACEOF
15581
15582fi
15583
15584done
15585
15586
15587# On Solaris, term.h requires curses.h
15588for ac_header in term.h
15589do :
15590 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15591#ifdef HAVE_CURSES_H
15592#include <curses.h>
15593#endif
15594
15595"
15596if test "x$ac_cv_header_term_h" = xyes; then :
15597 cat >>confdefs.h <<_ACEOF
15598#define HAVE_TERM_H 1
15599_ACEOF
15600
15601fi
15602
15603done
15604
15605
Jack Jansen666b1e72001-10-31 12:11:48 +000015606# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15608$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015609if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015611else
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015613/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015614#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015615int
15616main ()
15617{
Jack Jansen666b1e72001-10-31 12:11:48 +000015618
15619 int rtn;
15620 rtn = mvwdelch(0,0,0);
15621
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 ;
15623 return 0;
15624}
15625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015626if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015627 ac_cv_mvwdelch_is_expression=yes
15628else
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15632fi
15633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15635$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015636
15637if test "$ac_cv_mvwdelch_is_expression" = yes
15638then
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015641
15642fi
15643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15645$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015646if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015648else
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015650/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015651#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015652int
15653main ()
15654{
Jack Jansen666b1e72001-10-31 12:11:48 +000015655
15656 WINDOW *w;
15657 w->_flags = 0;
15658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ;
15660 return 0;
15661}
15662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015663if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015664 ac_cv_window_has_flags=yes
15665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15669fi
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15672$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015673
Jack Jansen666b1e72001-10-31 12:11:48 +000015674
15675if test "$ac_cv_window_has_flags" = yes
15676then
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015679
15680fi
15681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15683$as_echo_n "checking for is_term_resized... " >&6; }
15684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015685/* end confdefs.h. */
15686#include <curses.h>
15687int
15688main ()
15689{
15690void *x=is_term_resized
15691 ;
15692 return 0;
15693}
15694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015698
Matthias Kloseb159a552010-04-25 21:00:44 +000015699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015700$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15703$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015704
15705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15709$as_echo_n "checking for resize_term... " >&6; }
15710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015711/* end confdefs.h. */
15712#include <curses.h>
15713int
15714main ()
15715{
15716void *x=resize_term
15717 ;
15718 return 0;
15719}
15720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015721if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724
Matthias Kloseb159a552010-04-25 21:00:44 +000015725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15729$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015730
15731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15735$as_echo_n "checking for resizeterm... " >&6; }
15736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015737/* end confdefs.h. */
15738#include <curses.h>
15739int
15740main ()
15741{
15742void *x=resizeterm
15743 ;
15744 return 0;
15745}
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015748
Matthias Kloseb9621712010-04-24 17:59:49 +000015749$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015750
Matthias Kloseb159a552010-04-25 21:00:44 +000015751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015752$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15755$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015756
15757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015759# last curses configure check
15760CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15763$as_echo "$as_me: checking for device files" >&6;}
15764
15765if test "x$cross_compiling" = xyes; then
15766 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15768$as_echo_n "checking for /dev/ptmx... " >&6; }
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15770$as_echo "not set" >&6; }
15771 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15772 fi
15773 if test "${ac_cv_file__dev_ptc+set}" != set; then
15774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15775$as_echo_n "checking for /dev/ptc... " >&6; }
15776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15777$as_echo "not set" >&6; }
15778 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15779 fi
15780fi
15781
Matthias Kloseb9621712010-04-24 17:59:49 +000015782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15783$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015784if ${ac_cv_file__dev_ptmx+:} false; then :
15785 $as_echo_n "(cached) " >&6
15786else
15787 test "$cross_compiling" = yes &&
15788 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15789if test -r "/dev/ptmx"; then
15790 ac_cv_file__dev_ptmx=yes
15791else
15792 ac_cv_file__dev_ptmx=no
15793fi
15794fi
15795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15796$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15797if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015798
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015799fi
15800
15801if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015804
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15807$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015808if ${ac_cv_file__dev_ptc+:} false; then :
15809 $as_echo_n "(cached) " >&6
15810else
15811 test "$cross_compiling" = yes &&
15812 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15813if test -r "/dev/ptc"; then
15814 ac_cv_file__dev_ptc=yes
15815else
15816 ac_cv_file__dev_ptc=no
15817fi
15818fi
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15820$as_echo "$ac_cv_file__dev_ptc" >&6; }
15821if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015822
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015823fi
15824
15825if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015828
Neal Norwitz865400f2003-03-21 01:42:58 +000015829fi
15830
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015831if test "$have_long_long" = yes
15832then
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15834$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015835 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015839 ac_cv_have_long_long_format="cross -- assuming no"
15840 if test x$GCC = xyes; then
15841 save_CFLAGS=$CFLAGS
15842 CFLAGS="$CFLAGS -Werror -Wformat"
15843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844/* end confdefs.h. */
15845
15846 #include <stdio.h>
15847 #include <stddef.h>
15848
15849int
15850main ()
15851{
15852
15853 char *buffer;
15854 sprintf(buffer, "%lld", (long long)123);
15855 sprintf(buffer, "%lld", (long long)-123);
15856 sprintf(buffer, "%llu", (unsigned long long)123);
15857
15858 ;
15859 return 0;
15860}
15861_ACEOF
15862if ac_fn_c_try_compile "$LINENO"; then :
15863 ac_cv_have_long_long_format=yes
15864
15865fi
15866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15867 CFLAGS=$save_CFLAGS
15868 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015869else
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015871/* end confdefs.h. */
15872
15873 #include <stdio.h>
15874 #include <stddef.h>
15875 #include <string.h>
15876
15877 #ifdef HAVE_SYS_TYPES_H
15878 #include <sys/types.h>
15879 #endif
15880
15881 int main()
15882 {
15883 char buffer[256];
15884
15885 if (sprintf(buffer, "%lld", (long long)123) < 0)
15886 return 1;
15887 if (strcmp(buffer, "123"))
15888 return 1;
15889
15890 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15891 return 1;
15892 if (strcmp(buffer, "-123"))
15893 return 1;
15894
15895 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15896 return 1;
15897 if (strcmp(buffer, "123"))
15898 return 1;
15899
15900 return 0;
15901 }
15902
15903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015905 ac_cv_have_long_long_format=yes
15906else
Matthias Kloseb9621712010-04-24 17:59:49 +000015907 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015911fi
15912
15913
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015914fi
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15917$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015918fi
15919
Mark Dickinson89d7d412009-12-31 20:50:59 +000015920if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015921then
15922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015924
15925fi
15926
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015927if test $ac_sys_system = Darwin
15928then
15929 LIBS="$LIBS -framework CoreFoundation"
15930fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15933$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015934if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015936else
Matthias Kloseb9621712010-04-24 17:59:49 +000015937 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015938 ac_cv_have_size_t_format="cross -- assuming yes"
15939
Thomas Wouters477c8d52006-05-27 19:21:47 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015942/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015943
Thomas Wouters477c8d52006-05-27 19:21:47 +000015944#include <stdio.h>
15945#include <stddef.h>
15946#include <string.h>
15947
Christian Heimes2c181612007-12-17 20:04:13 +000015948#ifdef HAVE_SYS_TYPES_H
15949#include <sys/types.h>
15950#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015951
15952#ifdef HAVE_SSIZE_T
15953typedef ssize_t Py_ssize_t;
15954#elif SIZEOF_VOID_P == SIZEOF_LONG
15955typedef long Py_ssize_t;
15956#else
15957typedef int Py_ssize_t;
15958#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015959
Christian Heimes2c181612007-12-17 20:04:13 +000015960int main()
15961{
15962 char buffer[256];
15963
Thomas Wouters477c8d52006-05-27 19:21:47 +000015964 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15965 return 1;
15966
Thomas Wouters89f507f2006-12-13 04:49:30 +000015967 if (strcmp(buffer, "123"))
15968 return 1;
15969
15970 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15971 return 1;
15972
15973 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015974 return 1;
15975
15976 return 0;
15977}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015978
Thomas Wouters477c8d52006-05-27 19:21:47 +000015979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015980if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015981 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015982else
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015987fi
15988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15991$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015992if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015995
15996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015999#ifdef HAVE_SYS_TYPES_H
16000#include <sys/types.h>
16001#endif
16002#ifdef HAVE_SYS_SOCKET_H
16003#include <sys/socket.h>
16004#endif
16005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006"
Victor Stinnere0be4232011-10-25 13:06:09 +020016007if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016008
Martin v. Löwis11437992002-04-12 09:54:03 +000016009else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016012
16013fi
16014
Michael W. Hudson54241132001-12-07 15:38:26 +000016015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16017$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016018if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016020else
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016022 ac_cv_broken_mbstowcs=no
16023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016025/* end confdefs.h. */
16026
Stefan Krah19c21392012-11-22 23:47:32 +010016027#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016028#include<stdlib.h>
16029int main() {
16030 size_t len = -1;
16031 const char *str = "text";
16032 len = mbstowcs(NULL, str, 0);
16033 return (len != 4);
16034}
16035
16036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016037if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016038 ac_cv_broken_mbstowcs=no
16039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016044fi
16045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016046fi
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16049$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016050if test "$ac_cv_broken_mbstowcs" = yes
16051then
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016054
16055fi
16056
Antoine Pitroub52ec782009-01-25 16:34:23 +000016057# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16059$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016060
16061# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016062if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016063 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016064if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016065then
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16070$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016071fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016072if test "$withval" = no
16073then
16074
16075$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016079fi
16080
Antoine Pitrou042b1282010-08-13 21:15:58 +000016081else
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16083$as_echo "no value specified" >&6; }
16084fi
16085
Antoine Pitroub52ec782009-01-25 16:34:23 +000016086
Matthias Kloseb17289e2012-03-15 19:51:34 +010016087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16088$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16089if ${ac_cv_computed_gotos+:} false; then :
16090 $as_echo_n "(cached) " >&6
16091else
16092 if test "$cross_compiling" = yes; then :
16093 if test "${with_computed_gotos+set}" = set; then
16094 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16095 else
16096 ac_cv_computed_gotos=no
16097 fi
16098else
16099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16100/* end confdefs.h. */
16101
16102int main(int argc, char **argv)
16103{
16104 static void *targets[1] = { &&LABEL1 };
16105 goto LABEL2;
16106LABEL1:
16107 return 0;
16108LABEL2:
16109 goto *targets[0];
16110 return 1;
16111}
16112
16113_ACEOF
16114if ac_fn_c_try_run "$LINENO"; then :
16115 ac_cv_computed_gotos=yes
16116else
16117 ac_cv_computed_gotos=no
16118fi
16119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16120 conftest.$ac_objext conftest.beam conftest.$ac_ext
16121fi
16122
16123fi
16124
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16126$as_echo "$ac_cv_computed_gotos" >&6; }
16127case "$ac_cv_computed_gotos" in yes*)
16128
16129$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16130
16131esac
16132
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016133case $ac_sys_system in
16134AIX*)
16135
16136$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16137 ;;
16138esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016139
Michael W. Hudson54241132001-12-07 15:38:26 +000016140
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016141
16142
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016143for h in `(cd $srcdir;echo Python/thread_*.h)`
16144do
16145 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16146done
16147
Michael W. Hudson54241132001-12-07 15:38:26 +000016148
Ned Deily0db50cf2014-07-25 12:41:31 -070016149SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16151$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016152for dir in $SRCDIRS; do
16153 if test ! -d $dir; then
16154 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016155 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016156done
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16158$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016159
Stefan Krah1919b7e2012-03-21 18:25:23 +010016160# Availability of -O2:
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16162$as_echo_n "checking for -O2... " >&6; }
16163saved_cflags="$CFLAGS"
16164CFLAGS="-O2"
16165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166/* end confdefs.h. */
16167
16168int
16169main ()
16170{
16171
16172
16173 ;
16174 return 0;
16175}
16176_ACEOF
16177if ac_fn_c_try_compile "$LINENO"; then :
16178 have_O2=yes
16179else
16180 have_O2=no
16181fi
16182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16184$as_echo "$have_O2" >&6; }
16185CFLAGS="$saved_cflags"
16186
16187# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16188# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16190$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16191saved_cflags="$CFLAGS"
16192CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16193if test "$have_O2" = no; then
16194 CFLAGS=""
16195fi
16196if test "$cross_compiling" = yes; then :
16197 have_glibc_memmove_bug=undefined
16198else
16199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201
16202#include <stdio.h>
16203#include <stdlib.h>
16204#include <string.h>
16205void foo(void *p, void *q) { memmove(p, q, 19); }
16206int main() {
16207 char a[32] = "123456789000000000";
16208 foo(&a[9], a);
16209 if (strcmp(a, "123456789123456789000000000") != 0)
16210 return 1;
16211 foo(a, &a[9]);
16212 if (strcmp(a, "123456789000000000") != 0)
16213 return 1;
16214 return 0;
16215}
16216
16217_ACEOF
16218if ac_fn_c_try_run "$LINENO"; then :
16219 have_glibc_memmove_bug=no
16220else
16221 have_glibc_memmove_bug=yes
16222fi
16223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16224 conftest.$ac_objext conftest.beam conftest.$ac_ext
16225fi
16226
16227CFLAGS="$saved_cflags"
16228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16229$as_echo "$have_glibc_memmove_bug" >&6; }
16230if test "$have_glibc_memmove_bug" = yes; then
16231
16232$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16233
16234fi
16235
16236if test "$have_gcc_asm_for_x87" = yes; then
16237 # Some versions of gcc miscompile inline asm:
16238 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16239 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16240 case $CC in
16241 *gcc*)
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16243$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16244 saved_cflags="$CFLAGS"
16245 CFLAGS="-O2"
16246 if test "$cross_compiling" = yes; then :
16247 have_ipa_pure_const_bug=undefined
16248else
16249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16250/* end confdefs.h. */
16251
16252 __attribute__((noinline)) int
16253 foo(int *p) {
16254 int r;
16255 asm ( "movl \$6, (%1)\n\t"
16256 "xorl %0, %0\n\t"
16257 : "=r" (r) : "r" (p) : "memory"
16258 );
16259 return r;
16260 }
16261 int main() {
16262 int p = 8;
16263 if ((foo(&p) ? : p) != 6)
16264 return 1;
16265 return 0;
16266 }
16267
16268_ACEOF
16269if ac_fn_c_try_run "$LINENO"; then :
16270 have_ipa_pure_const_bug=no
16271else
16272 have_ipa_pure_const_bug=yes
16273fi
16274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16275 conftest.$ac_objext conftest.beam conftest.$ac_ext
16276fi
16277
16278 CFLAGS="$saved_cflags"
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16280$as_echo "$have_ipa_pure_const_bug" >&6; }
16281 if test "$have_ipa_pure_const_bug" = yes; then
16282
16283$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16284
16285 fi
16286 ;;
16287 esac
16288fi
16289
Victor Stinner4f5366e2015-01-09 02:13:19 +010016290# Check for stdatomic.h
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16292$as_echo_n "checking for stdatomic.h... " >&6; }
16293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294/* end confdefs.h. */
16295
16296
16297 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016298 atomic_int value = ATOMIC_VAR_INIT(1);
16299 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016300 int main() {
16301 int loaded_value = atomic_load(&value);
16302 return 0;
16303 }
16304
16305
16306_ACEOF
16307if ac_fn_c_try_link "$LINENO"; then :
16308 have_stdatomic_h=yes
16309else
16310 have_stdatomic_h=no
16311fi
16312rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16314
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16316$as_echo "$have_stdatomic_h" >&6; }
16317
16318if test "$have_stdatomic_h" = yes; then
16319
16320$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16321
16322fi
16323
16324# Check for GCC >= 4.7 __atomic builtins
16325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16326$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16328/* end confdefs.h. */
16329
16330
16331 volatile int val = 1;
16332 int main() {
16333 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16334 return 0;
16335 }
16336
16337
16338_ACEOF
16339if ac_fn_c_try_link "$LINENO"; then :
16340 have_builtin_atomic=yes
16341else
16342 have_builtin_atomic=no
16343fi
16344rm -f core conftest.err conftest.$ac_objext \
16345 conftest$ac_exeext conftest.$ac_ext
16346
16347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16348$as_echo "$have_builtin_atomic" >&6; }
16349
16350if test "$have_builtin_atomic" = yes; then
16351
16352$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16353
16354fi
16355
Ned Deily322f5ba2013-11-21 23:01:59 -080016356# ensurepip option
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16358$as_echo_n "checking for ensurepip... " >&6; }
16359
16360# Check whether --with-ensurepip was given.
16361if test "${with_ensurepip+set}" = set; then :
16362 withval=$with_ensurepip;
16363else
16364 with_ensurepip=upgrade
16365fi
16366
16367case $with_ensurepip in #(
16368 yes|upgrade) :
16369 ENSUREPIP=upgrade ;; #(
16370 install) :
16371 ENSUREPIP=install ;; #(
16372 no) :
16373 ENSUREPIP=no ;; #(
16374 *) :
16375 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16376esac
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16378$as_echo "$ENSUREPIP" >&6; }
16379
16380
Victor Stinner35a97c02015-03-08 02:59:09 +010016381# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16383$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385/* end confdefs.h. */
16386
16387
16388 #include <dirent.h>
16389
16390 int main() {
16391 struct dirent entry;
16392 return entry.d_type == DT_UNKNOWN;
16393 }
16394
16395
16396_ACEOF
16397if ac_fn_c_try_link "$LINENO"; then :
16398 have_dirent_d_type=yes
16399else
16400 have_dirent_d_type=no
16401fi
16402rm -f core conftest.err conftest.$ac_objext \
16403 conftest$ac_exeext conftest.$ac_ext
16404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16405$as_echo "$have_dirent_d_type" >&6; }
16406
16407if test "$have_dirent_d_type" = yes; then
16408
16409$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16410
16411fi
16412
Victor Stinner9eb57c52015-03-19 22:21:49 +010016413# check if the Linux getrandom() syscall is available
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16415$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16417/* end confdefs.h. */
16418
16419
Victor Stinner1b80b242016-04-12 22:34:58 +020016420 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016421 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016422 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016423
16424 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016425 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016426 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016427 const int flags = GRND_NONBLOCK;
16428 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016429 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016430 return 0;
16431 }
16432
16433
16434_ACEOF
16435if ac_fn_c_try_link "$LINENO"; then :
16436 have_getrandom_syscall=yes
16437else
16438 have_getrandom_syscall=no
16439fi
16440rm -f core conftest.err conftest.$ac_objext \
16441 conftest$ac_exeext conftest.$ac_ext
16442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16443$as_echo "$have_getrandom_syscall" >&6; }
16444
16445if test "$have_getrandom_syscall" = yes; then
16446
16447$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16448
16449fi
16450
Victor Stinner3abf44e2015-09-18 15:38:37 +020016451# check if the getrandom() function is available
16452# the test was written for the Solaris function of <sys/random.h>
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16454$as_echo_n "checking for the getrandom() function... " >&6; }
16455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h. */
16457
16458
16459 #include <sys/random.h>
16460
16461 int main() {
16462 char buffer[1];
16463 const size_t buflen = sizeof(buffer);
16464 const int flags = 0;
16465 /* ignore the result, Python checks for ENOSYS at runtime */
16466 (void)getrandom(buffer, buflen, flags);
16467 return 0;
16468 }
16469
16470
16471_ACEOF
16472if ac_fn_c_try_link "$LINENO"; then :
16473 have_getrandom=yes
16474else
16475 have_getrandom=no
16476fi
16477rm -f core conftest.err conftest.$ac_objext \
16478 conftest$ac_exeext conftest.$ac_ext
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16480$as_echo "$have_getrandom" >&6; }
16481
16482if test "$have_getrandom" = yes; then
16483
16484$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16485
16486fi
16487
Guido van Rossum627b2d71993-12-24 10:39:16 +000016488# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016489ac_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 +000016490
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016491ac_config_files="$ac_config_files Modules/ld_so_aix"
16492
Martin v. Löwis11437992002-04-12 09:54:03 +000016493cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494# This file is a shell script that caches the results of configure
16495# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016496# scripts and configure runs, see configure's option --config-cache.
16497# It is not useful on other systems. If it contains results you don't
16498# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016499#
Martin v. Löwis11437992002-04-12 09:54:03 +000016500# config.status only pays attention to the cache file if you give it
16501# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016502#
Skip Montanaro6dead952003-09-25 14:50:04 +000016503# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016504# loading this file, other *unset* `ac_cv_foo' will be assigned the
16505# following values.
16506
16507_ACEOF
16508
Guido van Rossumf78abae1997-01-21 22:02:36 +000016509# The following way of writing the cache mishandles newlines in values,
16510# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016512# Ultrix sh set writes to stderr and can't be redirected directly,
16513# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514(
16515 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16516 eval ac_val=\$$ac_var
16517 case $ac_val in #(
16518 *${as_nl}*)
16519 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16521$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 esac
16523 case $ac_var in #(
16524 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16526 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527 esac ;;
16528 esac
16529 done
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16533 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 # `set' does not quote correctly, so add quotes: double-quote
16535 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016537 "s/'/'\\\\''/g;
16538 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 *)
16541 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 esac |
16545 sort
16546) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16552 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16554 :end' >>confcache
16555if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16556 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016557 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016558 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16559$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016560 if test ! -f "$cache_file" || test -h "$cache_file"; then
16561 cat confcache >"$cache_file"
16562 else
16563 case $cache_file in #(
16564 */* | ?:*)
16565 mv -f confcache "$cache_file"$$ &&
16566 mv -f "$cache_file"$$ "$cache_file" ;; #(
16567 *)
16568 mv -f confcache "$cache_file" ;;
16569 esac
16570 fi
16571 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016572 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16574$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016575 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016576fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016577rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016579test "x$prefix" = xNONE && prefix=$ac_default_prefix
16580# Let make expand exec_prefix.
16581test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016583DEFS=-DHAVE_CONFIG_H
16584
Skip Montanaro6dead952003-09-25 14:50:04 +000016585ac_libobjs=
16586ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016587U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016588for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16589 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16593 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016594 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16595 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016596done
16597LIBOBJS=$ac_libobjs
16598
16599LTLIBOBJS=$ac_ltlibobjs
16600
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
Matthias Kloseb9621712010-04-24 17:59:49 +000016603
Victor Stinnere0be4232011-10-25 13:06:09 +020016604: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016605ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016606ac_clean_files_save=$ac_clean_files
16607ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016608{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16609$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16610as_write_fail=0
16611cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016612#! $SHELL
16613# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016614# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016615# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016616# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016619ac_cs_recheck=false
16620ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016621
Matthias Kloseb9621712010-04-24 17:59:49 +000016622SHELL=\${CONFIG_SHELL-$SHELL}
16623export SHELL
16624_ASEOF
16625cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16626## -------------------- ##
16627## M4sh Initialization. ##
16628## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630# Be more Bourne compatible
16631DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016632if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 emulate sh
16634 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016635 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016636 # is contrary to our usage. Disable this feature.
16637 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016639else
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 case `(set -o) 2>/dev/null` in #(
16641 *posix*) :
16642 set -o posix ;; #(
16643 *) :
16644 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016646fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016647
16648
Matthias Kloseb9621712010-04-24 17:59:49 +000016649as_nl='
16650'
16651export as_nl
16652# Printing a long string crashes Solaris 7 /usr/bin/printf.
16653as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16654as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16655as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16656# Prefer a ksh shell builtin over an external printf program on Solaris,
16657# but without wasting forks for bash or zsh.
16658if test -z "$BASH_VERSION$ZSH_VERSION" \
16659 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16660 as_echo='print -r --'
16661 as_echo_n='print -rn --'
16662elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16663 as_echo='printf %s\n'
16664 as_echo_n='printf %s'
16665else
16666 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16667 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16668 as_echo_n='/usr/ucb/echo -n'
16669 else
16670 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16671 as_echo_n_body='eval
16672 arg=$1;
16673 case $arg in #(
16674 *"$as_nl"*)
16675 expr "X$arg" : "X\\(.*\\)$as_nl";
16676 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16677 esac;
16678 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16679 '
16680 export as_echo_n_body
16681 as_echo_n='sh -c $as_echo_n_body as_echo'
16682 fi
16683 export as_echo_body
16684 as_echo='sh -c $as_echo_body as_echo'
16685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016686
16687# The user is always right.
16688if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 PATH_SEPARATOR=:
16690 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16691 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16692 PATH_SEPARATOR=';'
16693 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696
16697# IFS
16698# We need space, tab and new line, in precisely that order. Quoting is
16699# there to prevent editors from complaining about space-tab.
16700# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16701# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702IFS=" "" $as_nl"
16703
16704# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016705as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016706case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 *[\\/]* ) as_myself=$0 ;;
16708 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016709for as_dir in $PATH
16710do
16711 IFS=$as_save_IFS
16712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016713 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 ;;
16718esac
16719# We did not find ourselves, most probably we were run as `sh COMMAND'
16720# in which case we are not to be found in the path.
16721if test "x$as_myself" = x; then
16722 as_myself=$0
16723fi
16724if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016725 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16726 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727fi
16728
Matthias Kloseb9621712010-04-24 17:59:49 +000016729# Unset variables that we do not need and which cause bugs (e.g. in
16730# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16731# suppresses any "Segmentation fault" message there. '((' could
16732# trigger a bug in pdksh 5.2.14.
16733for as_var in BASH_ENV ENV MAIL MAILPATH
16734do eval test x\${$as_var+set} = xset \
16735 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736done
16737PS1='$ '
16738PS2='> '
16739PS4='+ '
16740
16741# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016742LC_ALL=C
16743export LC_ALL
16744LANGUAGE=C
16745export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
Matthias Kloseb9621712010-04-24 17:59:49 +000016747# CDPATH.
16748(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16749
16750
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016751# as_fn_error STATUS ERROR [LINENO LOG_FD]
16752# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016753# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16754# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016755# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016756as_fn_error ()
16757{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016758 as_status=$1; test $as_status -eq 0 && as_status=1
16759 if test "$4"; then
16760 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16761 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016763 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016764 as_fn_exit $as_status
16765} # as_fn_error
16766
16767
16768# as_fn_set_status STATUS
16769# -----------------------
16770# Set $? to STATUS, without forking.
16771as_fn_set_status ()
16772{
16773 return $1
16774} # as_fn_set_status
16775
16776# as_fn_exit STATUS
16777# -----------------
16778# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16779as_fn_exit ()
16780{
16781 set +e
16782 as_fn_set_status $1
16783 exit $1
16784} # as_fn_exit
16785
16786# as_fn_unset VAR
16787# ---------------
16788# Portably unset VAR.
16789as_fn_unset ()
16790{
16791 { eval $1=; unset $1;}
16792}
16793as_unset=as_fn_unset
16794# as_fn_append VAR VALUE
16795# ----------------------
16796# Append the text in VALUE to the end of the definition contained in VAR. Take
16797# advantage of any shell optimizations that allow amortized linear growth over
16798# repeated appends, instead of the typical quadratic growth present in naive
16799# implementations.
16800if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16801 eval 'as_fn_append ()
16802 {
16803 eval $1+=\$2
16804 }'
16805else
16806 as_fn_append ()
16807 {
16808 eval $1=\$$1\$2
16809 }
16810fi # as_fn_append
16811
16812# as_fn_arith ARG...
16813# ------------------
16814# Perform arithmetic evaluation on the ARGs, and store the result in the
16815# global $as_val. Take advantage of shells that can avoid forks. The arguments
16816# must be portable across $(()) and expr.
16817if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16818 eval 'as_fn_arith ()
16819 {
16820 as_val=$(( $* ))
16821 }'
16822else
16823 as_fn_arith ()
16824 {
16825 as_val=`expr "$@" || test $? -eq 1`
16826 }
16827fi # as_fn_arith
16828
16829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830if expr a : '\(a\)' >/dev/null 2>&1 &&
16831 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16832 as_expr=expr
16833else
16834 as_expr=false
16835fi
16836
16837if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16838 as_basename=basename
16839else
16840 as_basename=false
16841fi
16842
Matthias Kloseb9621712010-04-24 17:59:49 +000016843if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16844 as_dirname=dirname
16845else
16846 as_dirname=false
16847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849as_me=`$as_basename -- "$0" ||
16850$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16851 X"$0" : 'X\(//\)$' \| \
16852 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016853$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854 sed '/^.*\/\([^/][^/]*\)\/*$/{
16855 s//\1/
16856 q
16857 }
16858 /^X\/\(\/\/\)$/{
16859 s//\1/
16860 q
16861 }
16862 /^X\/\(\/\).*/{
16863 s//\1/
16864 q
16865 }
16866 s/.*/./; q'`
16867
Matthias Kloseb9621712010-04-24 17:59:49 +000016868# Avoid depending upon Character Ranges.
16869as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16870as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16871as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16872as_cr_digits='0123456789'
16873as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016876case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 xy) ECHO_C='\c';;
16881 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16882 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883 esac;;
16884*)
16885 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016887
Martin v. Löwis11437992002-04-12 09:54:03 +000016888rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889if test -d conf$$.dir; then
16890 rm -f conf$$.dir/conf$$.file
16891else
16892 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016895if (echo >conf$$.file) 2>/dev/null; then
16896 if ln -s conf$$.file conf$$ 2>/dev/null; then
16897 as_ln_s='ln -s'
16898 # ... but there are two gotchas:
16899 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16900 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016901 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016902 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016903 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 elif ln conf$$.file conf$$ 2>/dev/null; then
16905 as_ln_s=ln
16906 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016907 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016909else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016910 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16913rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016914
Matthias Kloseb9621712010-04-24 17:59:49 +000016915
16916# as_fn_mkdir_p
16917# -------------
16918# Create "$as_dir" as a directory, including parents if necessary.
16919as_fn_mkdir_p ()
16920{
16921
16922 case $as_dir in #(
16923 -*) as_dir=./$as_dir;;
16924 esac
16925 test -d "$as_dir" || eval $as_mkdir_p || {
16926 as_dirs=
16927 while :; do
16928 case $as_dir in #(
16929 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16930 *) as_qdir=$as_dir;;
16931 esac
16932 as_dirs="'$as_qdir' $as_dirs"
16933 as_dir=`$as_dirname -- "$as_dir" ||
16934$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16935 X"$as_dir" : 'X\(//\)[^/]' \| \
16936 X"$as_dir" : 'X\(//\)$' \| \
16937 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16938$as_echo X"$as_dir" |
16939 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16940 s//\1/
16941 q
16942 }
16943 /^X\(\/\/\)[^/].*/{
16944 s//\1/
16945 q
16946 }
16947 /^X\(\/\/\)$/{
16948 s//\1/
16949 q
16950 }
16951 /^X\(\/\).*/{
16952 s//\1/
16953 q
16954 }
16955 s/.*/./; q'`
16956 test -d "$as_dir" && break
16957 done
16958 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016959 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016960
16961
16962} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016963if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016964 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016965else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016967 as_mkdir_p=false
16968fi
16969
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016970
16971# as_fn_executable_p FILE
16972# -----------------------
16973# Test if FILE is an executable regular file.
16974as_fn_executable_p ()
16975{
16976 test -f "$1" && test -x "$1"
16977} # as_fn_executable_p
16978as_test_x='test -x'
16979as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
16981# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016982as_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 +000016983
16984# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016985as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
16987
Martin v. Löwis11437992002-04-12 09:54:03 +000016988exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016989## ----------------------------------- ##
16990## Main body of $CONFIG_STATUS script. ##
16991## ----------------------------------- ##
16992_ASEOF
16993test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016994
Matthias Kloseb9621712010-04-24 17:59:49 +000016995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16996# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016997# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998# values after options handling.
16999ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017000This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017001generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
17003 CONFIG_FILES = $CONFIG_FILES
17004 CONFIG_HEADERS = $CONFIG_HEADERS
17005 CONFIG_LINKS = $CONFIG_LINKS
17006 CONFIG_COMMANDS = $CONFIG_COMMANDS
17007 $ $0 $@
17008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009on `(hostname || uname -n) 2>/dev/null | sed 1q`
17010"
17011
Martin v. Löwis11437992002-04-12 09:54:03 +000017012_ACEOF
17013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014case $ac_config_files in *"
17015"*) set x $ac_config_files; shift; ac_config_files=$*;;
17016esac
17017
17018case $ac_config_headers in *"
17019"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17020esac
17021
17022
17023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017024# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017025config_files="$ac_config_files"
17026config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
Matthias Kloseb9621712010-04-24 17:59:49 +000017030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017031ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017032\`$as_me' instantiates files and other configuration actions
17033from templates according to the current configuration. Unless the files
17034and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
Matthias Kloseb9621712010-04-24 17:59:49 +000017036Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017037
17038 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 --config print configuration, then exit
17041 -q, --quiet, --silent
17042 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 -d, --debug don't remove temporary files
17044 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017045 --file=FILE[:TEMPLATE]
17046 instantiate the configuration file FILE
17047 --header=FILE[:TEMPLATE]
17048 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
17050Configuration files:
17051$config_files
17052
17053Configuration headers:
17054$config_headers
17055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017059cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17060ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017061ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017062python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017063configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017065
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017066Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017067This config.status script is free software; the Free Software Foundation
17068gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069
17070ac_pwd='$ac_pwd'
17071srcdir='$srcdir'
17072INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017073MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017074test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017075_ACEOF
17076
Matthias Kloseb9621712010-04-24 17:59:49 +000017077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17078# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017079ac_need_defaults=:
17080while test $# != 0
17081do
17082 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017083 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17085 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017086 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017088 --*=)
17089 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17090 ac_optarg=
17091 ac_shift=:
17092 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017094 ac_option=$1
17095 ac_optarg=$2
17096 ac_shift=shift
17097 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 esac
17099
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17103 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017105 $as_echo "$ac_cs_version"; exit ;;
17106 --config | --confi | --conf | --con | --co | --c )
17107 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 debug=: ;;
17110 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017112 case $ac_optarg in
17113 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017115 esac
17116 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 ac_need_defaults=false;;
17118 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017119 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017120 case $ac_optarg in
17121 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17122 esac
17123 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 --he | --h)
17126 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017127 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017128Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017129 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017131 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17132 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17133 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
17135 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017136 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017137Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017138
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
17142 esac
17143 shift
17144done
17145
Skip Montanaro6dead952003-09-25 14:50:04 +000017146ac_configure_extra_args=
17147
17148if $ac_cs_silent; then
17149 exec 6>/dev/null
17150 ac_configure_extra_args="$ac_configure_extra_args --silent"
17151fi
17152
17153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017155if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017156 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 shift
17158 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17159 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017162fi
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017165cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166exec 5>>config.log
17167{
17168 echo
17169 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17170## Running $as_me. ##
17171_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017178
Matthias Kloseb9621712010-04-24 17:59:49 +000017179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180
17181# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017182for ac_config_target in $ac_config_targets
17183do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184 case $ac_config_target in
17185 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17186 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17187 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017188 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17189 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17191 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017192 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017193 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017194 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195
Victor Stinnere0be4232011-10-25 13:06:09 +020017196 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 esac
17198done
17199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200
Martin v. Löwis11437992002-04-12 09:54:03 +000017201# If the user did not use the arguments to specify the items to instantiate,
17202# then the envvar interface is used. Set only those that are not.
17203# We use the long form for the default assignment because of an extremely
17204# bizarre bug on SunOS 4.1.3.
17205if $ac_need_defaults; then
17206 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17207 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17208fi
17209
Skip Montanaro6dead952003-09-25 14:50:04 +000017210# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017212# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213# Hook for its removal unless debugging.
17214# Note that there is a small window in which the directory will not be cleaned:
17215# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017216$debug ||
17217{
Victor Stinnere0be4232011-10-25 13:06:09 +020017218 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017220 : "${ac_tmp:=$tmp}"
17221 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017224}
Martin v. Löwis11437992002-04-12 09:54:03 +000017225# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017226
Martin v. Löwis11437992002-04-12 09:54:03 +000017227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017229 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017230} ||
17231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 tmp=./conf$$-$RANDOM
17233 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017234} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017235ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017236
Matthias Kloseb9621712010-04-24 17:59:49 +000017237# Set up the scripts for CONFIG_FILES section.
17238# No need to generate them if there are no CONFIG_FILES.
17239# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017241
Matthias Kloseb9621712010-04-24 17:59:49 +000017242
17243ac_cr=`echo X | tr X '\015'`
17244# On cygwin, bash can eat \r inside `` if the user requested igncr.
17245# But we know of no other shell where ac_cr would be empty at this
17246# point, so we can use a bashism as a fallback.
17247if test "x$ac_cr" = x; then
17248 eval ac_cr=\$\'\\r\'
17249fi
17250ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17251if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017252 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017253else
17254 ac_cs_awk_cr=$ac_cr
17255fi
17256
Victor Stinnere0be4232011-10-25 13:06:09 +020017257echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017258_ACEOF
17259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260
Matthias Kloseb9621712010-04-24 17:59:49 +000017261{
17262 echo "cat >conf$$subs.awk <<_ACEOF" &&
17263 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17264 echo "_ACEOF"
17265} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17267ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268ac_delim='%!_!# '
17269for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017270 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017271 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17274 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275 break
17276 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 else
17279 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281done
Matthias Kloseb9621712010-04-24 17:59:49 +000017282rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017285cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017287sed -n '
17288h
17289s/^/S["/; s/!.*/"]=/
17290p
17291g
17292s/^[^!]*!//
17293:repl
17294t repl
17295s/'"$ac_delim"'$//
17296t delim
17297:nl
17298h
17299s/\(.\{148\}\)..*/\1/
17300t more1
17301s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17302p
17303n
17304b repl
17305:more1
17306s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17307p
17308g
17309s/.\{148\}//
17310t nl
17311:delim
17312h
17313s/\(.\{148\}\)..*/\1/
17314t more2
17315s/["\\]/\\&/g; s/^/"/; s/$/"/
17316p
17317b
17318:more2
17319s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17320p
17321g
17322s/.\{148\}//
17323t delim
17324' <conf$$subs.awk | sed '
17325/^[^""]/{
17326 N
17327 s/\n//
17328}
17329' >>$CONFIG_STATUS || ac_write_fail=1
17330rm -f conf$$subs.awk
17331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17332_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017333cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 for (key in S) S_is_set[key] = 1
17335 FS = ""
17336
17337}
17338{
17339 line = $ 0
17340 nfields = split(line, field, "@")
17341 substed = 0
17342 len = length(field[1])
17343 for (i = 2; i < nfields; i++) {
17344 key = field[i]
17345 keylen = length(key)
17346 if (S_is_set[key]) {
17347 value = S[key]
17348 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17349 len += length(value) + length(field[++i])
17350 substed = 1
17351 } else
17352 len += 1 + keylen
17353 }
17354
17355 print line
17356}
17357
17358_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17361if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17362 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17363else
17364 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017365fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017366 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017367_ACEOF
17368
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017369# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17370# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371# trailing colons and then remove the whole line if VPATH becomes empty
17372# (actually we leave an empty line to preserve line numbers).
17373if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017374 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17375h
17376s///
17377s/^/:/
17378s/[ ]*$/:/
17379s/:\$(srcdir):/:/g
17380s/:\${srcdir}:/:/g
17381s/:@srcdir@:/:/g
17382s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017384x
17385s/\(=[ ]*\).*/\1/
17386G
17387s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388s/^[^=]*=[ ]*$//
17389}'
17390fi
17391
Matthias Kloseb9621712010-04-24 17:59:49 +000017392cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017393fi # test -n "$CONFIG_FILES"
17394
Matthias Kloseb9621712010-04-24 17:59:49 +000017395# Set up the scripts for CONFIG_HEADERS section.
17396# No need to generate them if there are no CONFIG_HEADERS.
17397# This happens for instance with `./config.status Makefile'.
17398if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017399cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017400BEGIN {
17401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403# Transform confdefs.h into an awk script `defines.awk', embedded as
17404# here-document in config.status, that substitutes the proper values into
17405# config.h.in to produce config.h.
17406
17407# Create a delimiter string that does not exist in confdefs.h, to ease
17408# handling of long lines.
17409ac_delim='%!_!# '
17410for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017411 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17412 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 break
17414 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017415 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 else
17417 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17418 fi
17419done
17420
17421# For the awk script, D is an array of macro values keyed by name,
17422# likewise P contains macro parameters if any. Preserve backslash
17423# newline sequences.
17424
17425ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17426sed -n '
17427s/.\{148\}/&'"$ac_delim"'/g
17428t rset
17429:rset
17430s/^[ ]*#[ ]*define[ ][ ]*/ /
17431t def
17432d
17433:def
17434s/\\$//
17435t bsnl
17436s/["\\]/\\&/g
17437s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17438D["\1"]=" \3"/p
17439s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17440d
17441:bsnl
17442s/["\\]/\\&/g
17443s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17444D["\1"]=" \3\\\\\\n"\\/p
17445t cont
17446s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17447t cont
17448d
17449:cont
17450n
17451s/.\{148\}/&'"$ac_delim"'/g
17452t clear
17453:clear
17454s/\\$//
17455t bsnlc
17456s/["\\]/\\&/g; s/^/"/; s/$/"/p
17457d
17458:bsnlc
17459s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17460b cont
17461' <confdefs.h | sed '
17462s/'"$ac_delim"'/"\\\
17463"/g' >>$CONFIG_STATUS || ac_write_fail=1
17464
17465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17466 for (key in D) D_is_set[key] = 1
17467 FS = ""
17468}
17469/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17470 line = \$ 0
17471 split(line, arg, " ")
17472 if (arg[1] == "#") {
17473 defundef = arg[2]
17474 mac1 = arg[3]
17475 } else {
17476 defundef = substr(arg[1], 2)
17477 mac1 = arg[2]
17478 }
17479 split(mac1, mac2, "(") #)
17480 macro = mac2[1]
17481 prefix = substr(line, 1, index(line, defundef) - 1)
17482 if (D_is_set[macro]) {
17483 # Preserve the white space surrounding the "#".
17484 print prefix "define", macro P[macro] D[macro]
17485 next
17486 } else {
17487 # Replace #undef with comments. This is necessary, for example,
17488 # in the case of _POSIX_SOURCE, which is predefined and required
17489 # on some systems where configure will not decide to define it.
17490 if (defundef == "undef") {
17491 print "/*", prefix defundef, macro, "*/"
17492 next
17493 }
17494 }
17495}
17496{ print }
17497_ACAWK
17498_ACEOF
17499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017500 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017501fi # test -n "$CONFIG_HEADERS"
17502
17503
17504eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17505shift
17506for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507do
17508 case $ac_tag in
17509 :[FHLC]) ac_mode=$ac_tag; continue;;
17510 esac
17511 case $ac_mode$ac_tag in
17512 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017513 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 :[FH]-) ac_tag=-:-;;
17515 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17516 esac
17517 ac_save_IFS=$IFS
17518 IFS=:
17519 set x $ac_tag
17520 IFS=$ac_save_IFS
17521 shift
17522 ac_file=$1
17523 shift
17524
17525 case $ac_mode in
17526 :L) ac_source=$1;;
17527 :[FH])
17528 ac_file_inputs=
17529 for ac_f
17530 do
17531 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533 *) # Look for the file first in the build tree, then in the source tree
17534 # (if the path is not absolute). The absolute path cannot be DOS-style,
17535 # because $ac_f cannot contain `:'.
17536 test -f "$ac_f" ||
17537 case $ac_f in
17538 [\\/$]*) false;;
17539 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17540 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017541 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17544 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 done
17546
17547 # Let's still pretend it is `configure' which instantiates (i.e., don't
17548 # use $as_me), people would be surprised to read:
17549 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017550 configure_input='Generated from '`
17551 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17552 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 if test x"$ac_file" != x-; then
17554 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017555 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17556$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 # Neutralize special characters interpreted by sed in replacement strings.
17559 case $configure_input in #(
17560 *\&* | *\|* | *\\* )
17561 ac_sed_conf_input=`$as_echo "$configure_input" |
17562 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17563 *) ac_sed_conf_input=$configure_input;;
17564 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565
17566 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017567 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17568 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 esac
17570 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 esac
17572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017574$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017575 X"$ac_file" : 'X\(//\)[^/]' \| \
17576 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017578$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17580 s//\1/
17581 q
17582 }
17583 /^X\(\/\/\)[^/].*/{
17584 s//\1/
17585 q
17586 }
17587 /^X\(\/\/\)$/{
17588 s//\1/
17589 q
17590 }
17591 /^X\(\/\).*/{
17592 s//\1/
17593 q
17594 }
17595 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ac_builddir=.
17598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599case "$ac_dir" in
17600.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17601*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017602 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 case $ac_top_builddir_sub in
17606 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17607 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17608 esac ;;
17609esac
17610ac_abs_top_builddir=$ac_pwd
17611ac_abs_builddir=$ac_pwd$ac_dir_suffix
17612# for backward compatibility:
17613ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
17615case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 ac_top_srcdir=$ac_top_builddir_sub
17619 ac_abs_top_srcdir=$ac_pwd ;;
17620 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622 ac_top_srcdir=$srcdir
17623 ac_abs_top_srcdir=$srcdir ;;
17624 *) # Relative name.
17625 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17626 ac_top_srcdir=$ac_top_build_prefix$srcdir
17627 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017628esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630
Martin v. Löwis11437992002-04-12 09:54:03 +000017631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 case $ac_mode in
17633 :F)
17634 #
17635 # CONFIG_FILE
17636 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017637
17638 case $INSTALL in
17639 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017642 ac_MKDIR_P=$MKDIR_P
17643 case $MKDIR_P in
17644 [\\/$]* | ?:[\\/]* ) ;;
17645 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17646 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017647_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648
Matthias Kloseb9621712010-04-24 17:59:49 +000017649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650# If the template does not know about datarootdir, expand it.
17651# FIXME: This hack should be removed a few years after 2.60.
17652ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017653ac_sed_dataroot='
17654/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655 p
17656 q
17657}
17658/@datadir@/p
17659/@docdir@/p
17660/@infodir@/p
17661/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017662/@mandir@/p'
17663case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664*datarootdir*) ac_datarootdir_seen=yes;;
17665*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17667$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 ac_datarootdir_hack='
17671 s&@datadir@&$datadir&g
17672 s&@docdir@&$docdir&g
17673 s&@infodir@&$infodir&g
17674 s&@localedir@&$localedir&g
17675 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017676 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677esac
17678_ACEOF
17679
17680# Neutralize VPATH when `$srcdir' = `.'.
17681# Shell code in configure.ac might set extrasub.
17682# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17684ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017685$extrasub
17686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017688:t
17689/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017690s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017692s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693s&@srcdir@&$ac_srcdir&;t t
17694s&@abs_srcdir@&$ac_abs_srcdir&;t t
17695s&@top_srcdir@&$ac_top_srcdir&;t t
17696s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17697s&@builddir@&$ac_builddir&;t t
17698s&@abs_builddir@&$ac_abs_builddir&;t t
17699s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17700s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017701s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017703"
Victor Stinnere0be4232011-10-25 13:06:09 +020017704eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17705 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17709 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17710 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017712which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017713$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017714which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017715
Victor Stinnere0be4232011-10-25 13:06:09 +020017716 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17719 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017720 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017721 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ;;
17723 :H)
17724 #
17725 # CONFIG_HEADER
17726 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017727 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017728 {
17729 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017730 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17731 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017734 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17735$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017738 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017739 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 fi
17741 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017743 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017744 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748
17749 esac
17750
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017751
17752 case $ac_file$ac_mode in
17753 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17754
17755 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756done # for ac_tag
17757
Guido van Rossum627b2d71993-12-24 10:39:16 +000017758
Matthias Kloseb9621712010-04-24 17:59:49 +000017759as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017760_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017761ac_clean_files=$ac_clean_files_save
17762
Matthias Kloseb9621712010-04-24 17:59:49 +000017763test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017764 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017765
Martin v. Löwis11437992002-04-12 09:54:03 +000017766
17767# configure is writing to config.log, and then calls config.status.
17768# config.status does its own redirection, appending to config.log.
17769# Unfortunately, on DOS this fails, as config.log is still kept open
17770# by configure, so config.status won't be able to write to it; its
17771# output is simply discarded. So we exec the FD to /dev/null,
17772# effectively closing config.log, so it can be properly (re)opened and
17773# appended to by config.status. When coming back to configure, we
17774# need to make the FD available again.
17775if test "$no_create" != yes; then
17776 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017777 ac_config_status_args=
17778 test "$silent" = yes &&
17779 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017780 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017781 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 exec 5>>config.log
17783 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17784 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017785 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017786fi
17787if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17789$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017790fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017791
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017792
Christian Heimes75ed8902013-11-20 01:11:18 +010017793echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017794if test ! -f Modules/Setup
17795then
17796 cp $srcdir/Modules/Setup.dist Modules/Setup
17797fi
17798
Christian Heimes75ed8902013-11-20 01:11:18 +010017799echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017800if test ! -f Modules/Setup.local
17801then
17802 echo "# Edit this file for local setup changes" >Modules/Setup.local
17803fi
17804
Christian Heimes75ed8902013-11-20 01:11:18 +010017805echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017806$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17807 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017808 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017809mv config.c Modules